From a184e9e3282712242dd8e9464450e6638bba8b87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Schw=C3=A4gerl?= Date: Wed, 19 Jun 2024 10:04:32 +0200 Subject: [PATCH] chore: Remove reconciler prow jobs (#11051) * chore: Remove reconciler prow jobs * update CODEOWNERS * re-introduce branch protection rules --- CODEOWNERS | 4 - .../test_artifacts/test-prow-config.yaml | 2 - .../kymaBotGithubSecretTrustedUsage.yaml | 25 - prow/config.yaml | 2 - .../reconciler/reconciler-k3d.yaml | 37 -- .../kyma-incubator/reconciler/reconciler.yaml | 505 ------------------ .../control-plane-reconciler-integration.yaml | 111 ---- ...upgrade-kyma2-latest-to-main-gardener.yaml | 58 -- .../test-infra/pjconfigtests.yaml | 39 -- .../kyma-project/test-infra/pjtester.yaml | 88 --- prow/scripts/reconciler/common.sh | 432 --------------- .../reconciler/reconciler-e2e-gardener.sh | 109 ---- .../reconciler-e2e-nightly-gardener.sh | 48 -- .../reconciler-gardener-long-lasting.sh | 47 -- ...r-upgrade-kyma2-latest-to-main-gardener.sh | 155 ------ prow/scripts/reconciler/shoot-template.yaml | 57 -- ...trol-plane-autobump-reconciler-config.yaml | 16 - templates/config.yaml | 7 - .../data/control-plane-integration-data.yaml | 88 --- templates/data/incubator-buildpack-data.yaml | 285 ---------- 20 files changed, 2115 deletions(-) delete mode 100644 prow/jobs/kyma-incubator/reconciler/reconciler-k3d.yaml delete mode 100644 prow/jobs/kyma-incubator/reconciler/reconciler.yaml delete mode 100644 prow/jobs/kyma-project/control-plane/control-plane-reconciler-integration.yaml delete mode 100644 prow/jobs/kyma-project/control-plane/control-plane-reconciler-upgrade-kyma2-latest-to-main-gardener.yaml delete mode 100755 prow/scripts/reconciler/common.sh delete mode 100755 prow/scripts/reconciler/reconciler-e2e-gardener.sh delete mode 100755 prow/scripts/reconciler/reconciler-e2e-nightly-gardener.sh delete mode 100755 prow/scripts/reconciler/reconciler-gardener-long-lasting.sh delete mode 100755 prow/scripts/reconciler/reconciler-upgrade-kyma2-latest-to-main-gardener.sh delete mode 100644 prow/scripts/reconciler/shoot-template.yaml delete mode 100644 prow/scripts/resources/control-plane-autobump-reconciler-config.yaml delete mode 100644 templates/data/control-plane-integration-data.yaml diff --git a/CODEOWNERS b/CODEOWNERS index af461a4f1b47..3a747f10b002 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -31,8 +31,6 @@ /prow/jobs/kyma-project/control-plane/components/provisioner @kyma-project/framefrog @neighbors-dev-bot @kyma-project/prow /prow/jobs/kyma-project/control-plane/components/schema-migrator @kyma-project/gopher @kyma-project/framefrog @neighbors-dev-bot @kyma-project/prow /prow/jobs/kyma-project/control-plane/tests/e2e/provisioning @kyma-project/gopher @neighbors-dev-bot @kyma-project/prow -/prow/jobs/kyma-project/control-plane/control-plane-reconciler-integration.yaml @kyma-project/jellyfish @neighbors-dev-bot @kyma-project/prow -/prow/jobs/kyma-project/control-plane/control-plane-reconciler-upgrade-kyma2-latest-to-main-gardener.yaml @kyma-project/jellyfish @neighbors-dev-bot @kyma-project/prow /prow/jobs/kyma-project/control-plane/control-plane-validation.yaml @kyma-project/prow @neighbors-dev-bot /prow/jobs/kyma-project/control-plane/kcp-cli.yaml @kyma-project/operations @neighbors-dev-bot @kyma-project/prow /prow/jobs/kyma-project/directory-size-exporter/ @kyma-project/observability @neighbors-dev-bot @kyma-project/prow @@ -44,8 +42,6 @@ /prow/jobs/kyma-incubator/compass-console @kirilkabakchiev @petartodorovv @gvachkov @dimitarpetrov @nickymateev @dzahariev @dragobt @kaloyanspiridonov @nyordanoff @stanislavstefanov @ivantenevvasilev @ognyvrac @la4ezar @emmakarova @alextargov @neighbors-dev-bot @kyma-project/prow /prow/jobs/kyma-incubator/hydroform/hydroform.yaml @janmedrek @neighbors-dev-bot @kyma-project/prow /prow/jobs/kyma-incubator/ord-service @kirilkabakchiev @petartodorovv @gvachkov @dimitarpetrov @nickymateev @dzahariev @dragobt @kaloyanspiridonov @nyordanoff @stanislavstefanov @ivantenevvasilev @ognyvrac @la4ezar @emmakarova @alextargov @neighbors-dev-bot @kyma-project/prow -/prow/jobs/kyma-incubator/reconciler/reconciler-k3d.yaml @kyma-project/jellyfish @neighbors-dev-bot @kyma-project/prow -/prow/jobs/kyma-incubator/reconciler/reconciler.yaml @kyma-project/jellyfish @kyma-project/goat @neighbors-dev-bot @kyma-project/prow /prow/jobs/kyma-project/infrastructure-manager/ @kyma-project/framefrog @neighbors-dev-bot @kyma-project/prow /prow/jobs/kyma-project/istio/ @kyma-project/goat @neighbors-dev-bot @kyma-project/prow /prow/jobs/kyma-project/kyma/common @kyma-project/framefrog @neighbors-dev-bot @kyma-project/prow diff --git a/pkg/tools/pjtester/test_artifacts/test-prow-config.yaml b/pkg/tools/pjtester/test_artifacts/test-prow-config.yaml index f0b0a26e4083..151f66458514 100644 --- a/pkg/tools/pjtester/test_artifacts/test-prow-config.yaml +++ b/pkg/tools/pjtester/test_artifacts/test-prow-config.yaml @@ -1199,7 +1199,5 @@ presets: value: "https://kyma-env-broker.cp.dev.kyma.cloud.sap" - name: KCP_KUBECONFIG_API_URL value: "https://kubeconfig-service.cp.dev.kyma.cloud.sap" - - name: KCP_MOTHERSHIP_API_URL - value: "https://mothership-reconciler.cp.dev.kyma.cloud.sap/v1" - name: KCP_OIDC_ISSUER_URL value: "https://kymatest.accounts400.ondemand.com" diff --git a/prow/cluster/resources/gatekeeper-constraints/workloads/kymaBotGithubSecretTrustedUsage.yaml b/prow/cluster/resources/gatekeeper-constraints/workloads/kymaBotGithubSecretTrustedUsage.yaml index 2545e6839946..1c4d84163a3d 100644 --- a/prow/cluster/resources/gatekeeper-constraints/workloads/kymaBotGithubSecretTrustedUsage.yaml +++ b/prow/cluster/resources/gatekeeper-constraints/workloads/kymaBotGithubSecretTrustedUsage.yaml @@ -28,31 +28,6 @@ spec: - /tools/entrypoint args: [] entrypoint_options: '^.*"args":\["make","ci-release"\],"container_name":"test",.*$' - # pre-main-control-plane-reconciler-upgrade-kyma2-latest-to-main-gardener - - image: "eu.gcr.io/kyma-project/test-infra/kyma-integration:*" - command: - - /tools/entrypoint - args: [] - entrypoint_options: '^.*"args":\["\/home\/prow\/go\/src\/github\.com\/kyma-project\/test-infra\/prow\/scripts\/cluster-integration\/reconciler-upgrade-kyma2-latest-to-main-gardener\.sh","\/home\/prow\/go\/src\/github\.com\/kyma-incubator\/reconciler"\],"container_name":"test",.*$' - # reconciler-control-plane-image-bump - - image: "gcr.io/k8s-prow/generic-autobumper:*" - command: - - /tools/entrypoint - args: [] - entrypoint_options: '^.*"args":\["generic-autobumper","--config=\/home\/prow\/go\/src\/github\.com\/kyma-project\/test-infra\/prow\/autobump-config\/control-plane-autobump-reconciler-config\.yaml"\],"container_name":"test",.*$' - # nightly-main-reconciler - - image: "europe-docker.pkg.dev/kyma-project/prod/testimages/e2e-dind-nodejs:*" - command: - - /tools/entrypoint - args: [] - entrypoint_options: '^.*"args":\["\/home\/prow\/go\/src\/github\.com\/kyma-project\/test-infra\/prow\/scripts\/reconciler\/reconciler-gardener-long-lasting\.sh"\],"container_name":"test",.*$' - # nightly-main-reconciler-e2e - - image: "europe-docker.pkg.dev/kyma-project/prod/testimages/e2e-dind-nodejs:*" - command: - - /tools/entrypoint - args: [] - entrypoint_options: '^.*"args":\["\/home\/prow\/go\/src\/github\.com\/kyma-project\/test-infra\/prow\/scripts\/reconciler\/reconciler-e2e-nightly-gardener\.sh"\],"container_name":"test",.*$' - # *-kyma-artifacts, *-rel*-kyma-artifacts - image: "eu.gcr.io/kyma-project/test-infra/bootstrap:*" command: - /tools/entrypoint diff --git a/prow/config.yaml b/prow/config.yaml index 6b37ac5df671..ccfb77e4e662 100644 --- a/prow/config.yaml +++ b/prow/config.yaml @@ -1252,8 +1252,6 @@ presets: value: "https://kyma-env-broker.cp.dev.kyma.cloud.sap" - name: KCP_KUBECONFIG_API_URL value: "https://kubeconfig-service.cp.dev.kyma.cloud.sap" - - name: KCP_MOTHERSHIP_API_URL - value: "https://mothership-reconciler.cp.dev.kyma.cloud.sap/v1" - name: KCP_OIDC_ISSUER_URL value: "https://kymatest.accounts400.ondemand.com" - labels: diff --git a/prow/jobs/kyma-incubator/reconciler/reconciler-k3d.yaml b/prow/jobs/kyma-incubator/reconciler/reconciler-k3d.yaml deleted file mode 100644 index c46b2a758429..000000000000 --- a/prow/jobs/kyma-incubator/reconciler/reconciler-k3d.yaml +++ /dev/null @@ -1,37 +0,0 @@ -presubmits: - kyma-incubator/reconciler: - - name: pull-main-reconciler-integration-k3d - annotations: - description: "int test reconciler" - owner: "jellyfish" - labels: - prow.k8s.io/pubsub.project: "sap-kyma-prow" - prow.k8s.io/pubsub.runID: "pull-main-reconciler-integration-k3d" - prow.k8s.io/pubsub.topic: "prowjobs" - preset-kind-volume-mounts: "true" - preset-dind-enabled: "true" - run_if_changed: '^(go.mod$|go.sum$)|((cmd\S+|configs\S+|internal\S+|pkg\S+)(\.[^.][^.][^.]+$|\.[^.][^dD]$|\.[^mM][^.]$|\.[^.]$|/[^.]+$))' - skip_report: false - decorate: true - cluster: untrusted-workload - max_concurrency: 10 - branches: - - ^main$ - spec: - containers: - - image: europe-docker.pkg.dev/kyma-project/prod/testimages/e2e-dind-k3d:v20240617-cb2ed184 - command: [ "/init.sh" ] - securityContext: - privileged: true - seccompProfile: - type: Unconfined - allowPrivilegeEscalation: true - args: - - ./scripts/prow/reconciler-integration.sh - resources: - requests: - cpu: 2 - memory: 3Gi - limits: - cpu: 4 - memory: 6Gi diff --git a/prow/jobs/kyma-incubator/reconciler/reconciler.yaml b/prow/jobs/kyma-incubator/reconciler/reconciler.yaml deleted file mode 100644 index 1d1770fee162..000000000000 --- a/prow/jobs/kyma-incubator/reconciler/reconciler.yaml +++ /dev/null @@ -1,505 +0,0 @@ -# Code generated by rendertemplates. DO NOT EDIT. - - -presubmits: # runs on PRs - kyma-incubator/reconciler: - - name: pre-main-reconciler-unit-test - annotations: - description: "test reconciler" - owner: "jellyfish" - labels: - prow.k8s.io/pubsub.project: "sap-kyma-prow" - prow.k8s.io/pubsub.runID: "pre-main-reconciler-unit-test" - prow.k8s.io/pubsub.topic: "prowjobs" - always_run: true - skip_report: false - decorate: true - cluster: untrusted-workload - max_concurrency: 10 - spec: - containers: - - image: "europe-docker.pkg.dev/kyma-project/prod/testimages/buildpack-go:v20240617-cb2ed184" - securityContext: - privileged: false - seccompProfile: - type: RuntimeDefault - allowPrivilegeEscalation: false - command: - - "/bin/sh" - args: - - "-c" - - "make test" - resources: - requests: - memory: 1Gi - cpu: 100m - - name: pre-main-reconciler-lint - annotations: - description: "lint reconciler" - owner: "jellyfish" - labels: - prow.k8s.io/pubsub.project: "sap-kyma-prow" - prow.k8s.io/pubsub.runID: "pre-main-reconciler-lint" - prow.k8s.io/pubsub.topic: "prowjobs" - run_if_changed: '^(.*\.go$|.golangci.yaml)' - skip_report: false - decorate: true - cluster: untrusted-workload - max_concurrency: 10 - spec: - containers: - - image: "europe-docker.pkg.dev/kyma-project/prod/test-infra/golangci-lint:v20240610-c4997bfe" - securityContext: - privileged: false - seccompProfile: - type: RuntimeDefault - allowPrivilegeEscalation: false - command: - - "/bin/sh" - args: - - "-c" - - "golangci-lint run -v --timeout=20m --new-from-rev=$PULL_BASE_SHA ./..." - resources: - requests: - memory: 8Gi - cpu: 4 - limits: - memory: 8Gi - cpu: 4 - - name: pre-main-reconciler-publish-pr-cli - annotations: - description: "pre publish reconciler" - owner: "jellyfish" - labels: - prow.k8s.io/pubsub.project: "sap-kyma-prow" - prow.k8s.io/pubsub.runID: "pre-main-reconciler-publish-pr-cli" - prow.k8s.io/pubsub.topic: "prowjobs" - preset-gc-project-env: "true" - preset-kyma-cli-pr-unstable: "true" - preset-sa-vm-kyma-integration: "true" - run_if_changed: '^((cmd\S+|configs\S+|internal\S+|pkg\S+)(\.[^.][^.][^.]+$|\.[^.][^dD]$|\.[^mM][^.]$|\.[^.]$|/[^.]+$))' - optional: true - skip_report: false - decorate: true - cluster: untrusted-workload - max_concurrency: 10 - branches: - - ^master$ - - ^main$ - extra_refs: - - org: kyma-project - repo: cli - base_ref: main - - org: kyma-project - repo: test-infra - base_ref: main - spec: - containers: - - image: "europe-docker.pkg.dev/kyma-project/prod/testimages/e2e-gcloud:v20240617-cb2ed184" - securityContext: - privileged: false - seccompProfile: - type: RuntimeDefault - allowPrivilegeEscalation: false - command: - - "/home/prow/go/src/github.com/kyma-project/test-infra/prow/scripts/reconciler-publish-pr-cli.sh" - resources: - requests: - memory: 3Gi - cpu: 2 - - name: pre-main-kyma-incubator-mothership-reconciler - annotations: - description: "build mothership reconciler" - owner: "jellyfish" - labels: - prow.k8s.io/pubsub.project: "sap-kyma-prow" - prow.k8s.io/pubsub.runID: "pre-main-kyma-incubator-mothership-reconciler" - prow.k8s.io/pubsub.topic: "prowjobs" - preset-sa-kyma-push-images: "true" - always_run: true - skip_report: false - decorate: true - cluster: untrusted-workload - max_concurrency: 10 - branches: - - ^main$ - spec: - containers: - - image: "europe-docker.pkg.dev/kyma-project/prod/image-builder:v20240617-9b64b6ff" - securityContext: - privileged: false - seccompProfile: - type: RuntimeDefault - allowPrivilegeEscalation: false - command: - - "/image-builder" - args: - - "--name=incubator/reconciler/mothership" - - "--config=/config/kaniko-build-config.yaml" - - "--context=." - - "--dockerfile=Dockerfile.mr" - resources: - requests: - memory: 1.5Gi - cpu: 1 - volumeMounts: - - name: config - mountPath: /config - readOnly: true - - name: signify-secret - mountPath: /secret - readOnly: true - volumes: - - name: config - configMap: - name: kaniko-build-config - - name: signify-secret - secret: - secretName: signify-dev-secret - - name: pre-main-kyma-incubator-component-reconciler - annotations: - description: "build component reconciler" - owner: "jellyfish" - labels: - prow.k8s.io/pubsub.project: "sap-kyma-prow" - prow.k8s.io/pubsub.runID: "pre-main-kyma-incubator-component-reconciler" - prow.k8s.io/pubsub.topic: "prowjobs" - preset-sa-kyma-push-images: "true" - always_run: true - skip_report: false - decorate: true - cluster: untrusted-workload - max_concurrency: 10 - branches: - - ^main$ - spec: - containers: - - image: "europe-docker.pkg.dev/kyma-project/prod/image-builder:v20240617-9b64b6ff" - securityContext: - privileged: false - seccompProfile: - type: RuntimeDefault - allowPrivilegeEscalation: false - command: - - "/image-builder" - args: - - "--name=incubator/reconciler/component" - - "--config=/config/kaniko-build-config.yaml" - - "--context=." - - "--dockerfile=Dockerfile.cr" - resources: - requests: - memory: 1.5Gi - cpu: 1 - volumeMounts: - - name: config - mountPath: /config - readOnly: true - - name: signify-secret - mountPath: /secret - readOnly: true - volumes: - - name: config - configMap: - name: kaniko-build-config - - name: signify-secret - secret: - secretName: signify-dev-secret - - name: pre-main-reconciler-validate-dockerfiles - annotations: - description: "hadolint reconciler" - owner: "neighbors" - labels: - prow.k8s.io/pubsub.project: "sap-kyma-prow" - prow.k8s.io/pubsub.runID: "pre-main-reconciler-validate-dockerfiles" - prow.k8s.io/pubsub.topic: "prowjobs" - preset-kyma-guard-bot-github-token: "true" - run_if_changed: '.*Dockerfile$' - skip_report: false - decorate: true - cluster: untrusted-workload - max_concurrency: 10 - branches: - - ^main$ - extra_refs: - - org: kyma-project - repo: test-infra - base_ref: main - spec: - containers: - - image: "europe-docker.pkg.dev/kyma-project/prod/testimages/alpine-hadolint:v20240617-cb2ed184" - securityContext: - privileged: false - seccompProfile: - type: RuntimeDefault - allowPrivilegeEscalation: false - command: - - "/bin/bash" - args: - - "-c" - - "shopt -s globstar; hadolint --config .hadolint.yaml --no-color **/Dockerfile" - env: - - name: GO11MODULE - value: "on" - resources: - requests: - memory: 3Gi - cpu: 2 - -postsubmits: # runs on main - kyma-incubator/reconciler: - - name: post-main-kyma-incubator-mothership-reconciler - annotations: - description: "build reconciler" - owner: "jellyfish" - labels: - prow.k8s.io/pubsub.project: "sap-kyma-prow" - prow.k8s.io/pubsub.runID: "post-main-kyma-incubator-mothership-reconciler" - prow.k8s.io/pubsub.topic: "prowjobs" - preset-sa-kyma-push-images: "true" - preset-signify-prod-secret: "true" - always_run: true - skip_report: false - decorate: true - cluster: trusted-workload - max_concurrency: 10 - branches: - - ^main$ - spec: - containers: - - image: "europe-docker.pkg.dev/kyma-project/prod/image-builder:v20240617-9b64b6ff" - securityContext: - privileged: false - seccompProfile: - type: RuntimeDefault - allowPrivilegeEscalation: false - command: - - "/image-builder" - args: - - "--name=incubator/reconciler/mothership" - - "--config=/config/kaniko-build-config.yaml" - - "--context=." - - "--dockerfile=Dockerfile.mr" - - "--tag=latest" - resources: - requests: - memory: 1.5Gi - cpu: 1 - volumeMounts: - - name: config - mountPath: /config - readOnly: true - - name: signify-secret - mountPath: /secret - readOnly: true - volumes: - - name: config - configMap: - name: kaniko-build-config - - name: signify-secret - secret: - secretName: signify-dev-secret - - name: post-main-kyma-incubator-component-reconciler - annotations: - description: "build component reconciler" - owner: "jellyfish" - labels: - prow.k8s.io/pubsub.project: "sap-kyma-prow" - prow.k8s.io/pubsub.runID: "post-main-kyma-incubator-component-reconciler" - prow.k8s.io/pubsub.topic: "prowjobs" - preset-sa-kyma-push-images: "true" - preset-signify-prod-secret: "true" - always_run: true - skip_report: false - decorate: true - cluster: trusted-workload - max_concurrency: 10 - branches: - - ^main$ - spec: - containers: - - image: "europe-docker.pkg.dev/kyma-project/prod/image-builder:v20240617-9b64b6ff" - securityContext: - privileged: false - seccompProfile: - type: RuntimeDefault - allowPrivilegeEscalation: false - command: - - "/image-builder" - args: - - "--name=incubator/reconciler/component" - - "--config=/config/kaniko-build-config.yaml" - - "--context=." - - "--dockerfile=Dockerfile.cr" - - "--tag=latest" - resources: - requests: - memory: 1.5Gi - cpu: 1 - volumeMounts: - - name: config - mountPath: /config - readOnly: true - - name: signify-secret - mountPath: /secret - readOnly: true - volumes: - - name: config - configMap: - name: kaniko-build-config - - name: signify-secret - secret: - secretName: signify-dev-secret - -periodics: # runs on schedule - - name: reconciler-control-plane-image-bump - annotations: - description: "Reconciler image bump in control-plane" - owner: "jellyfish" - labels: - prow.k8s.io/pubsub.project: "sap-kyma-prow" - prow.k8s.io/pubsub.runID: "reconciler-control-plane-image-bump" - prow.k8s.io/pubsub.topic: "prowjobs" - preset-bot-github-token: "true" - preset-log-collector-slack-token: "true" - cron: "0 1-22/4 * * 1-5" - skip_report: false - decorate: true - decoration_config: - grace_period: 600000000000 - timeout: 14400000000000 - cluster: untrusted-workload - extra_refs: - - org: kyma-project - repo: control-plane - base_ref: main - - org: kyma-incubator - repo: reconciler - base_ref: main - - org: kyma-project - repo: test-infra - base_ref: main - reporter_config: - slack: - channel: jellyfish-notifications - spec: - containers: - - image: "gcr.io/k8s-prow/generic-autobumper:v20240614-e4ae242d1" - securityContext: - privileged: false - seccompProfile: - type: RuntimeDefault - allowPrivilegeEscalation: false - command: - - "generic-autobumper" - args: - - "--config=/home/prow/go/src/github.com/kyma-project/test-infra/configs/autobump-config/control-plane-autobump-reconciler-config.yaml" - resources: - requests: - memory: 3Gi - cpu: 2 - - name: nightly-main-reconciler - annotations: - description: "Creates and installs reconciler from main every night." - owner: "jellyfish" - labels: - prow.k8s.io/pubsub.project: "sap-kyma-prow" - prow.k8s.io/pubsub.runID: "nightly-main-reconciler" - prow.k8s.io/pubsub.topic: "prowjobs" - preset-cluster-version: "true" - preset-gardener-gcp-kyma-integration: "true" - preset-kyma-cli-stable: "true" - cron: "0 0 * * 1-5" - skip_report: false - decorate: true - cluster: untrusted-workload - extra_refs: - - org: kyma-project - repo: control-plane - base_ref: main - - org: kyma-project - repo: test-infra - base_ref: main - reporter_config: - slack: - channel: jellyfish-notifications - spec: - containers: - - image: "europe-docker.pkg.dev/kyma-project/prod/testimages/e2e-garden:v20240617-cb2ed184" - securityContext: - privileged: false - seccompProfile: - type: RuntimeDefault - allowPrivilegeEscalation: false - command: - - "/home/prow/go/src/github.com/kyma-project/test-infra/prow/scripts/reconciler/reconciler-gardener-long-lasting.sh" - env: - - name: GARDENER_REGION - value: "europe-west4" - - name: GARDENER_ZONES - value: "europe-west4-b" - - name: INPUT_CLUSTER_NAME - value: "rec-main" - - name: KYMA_PROJECT_DIR - value: "/home/prow/go/src/github.com/kyma-project" - resources: - requests: - memory: 3Gi - cpu: 2 - - name: nightly-main-reconciler-e2e - annotations: - description: "Executes e2e test periodically on nightly cluster for reconciler." - owner: "jellyfish" - labels: - prow.k8s.io/pubsub.project: "sap-kyma-prow" - prow.k8s.io/pubsub.runID: "nightly-main-reconciler-e2e" - prow.k8s.io/pubsub.topic: "prowjobs" - preset-bot-github-token: "true" - preset-cluster-version: "true" - preset-gardener-gcp-kyma-integration: "true" - preset-kyma-cli-stable: "true" - preset-log-collector-slack-token: "true" - cron: "0 5 * * 1-5" - skip_report: false - decorate: true - decoration_config: - grace_period: 600000000000 - timeout: 14400000000000 - cluster: untrusted-workload - extra_refs: - - org: kyma-project - repo: control-plane - base_ref: main - - org: kyma-project - repo: kyma - base_ref: main - - org: kyma-project - repo: test-infra - base_ref: main - reporter_config: - slack: - channel: jellyfish-notifications - spec: - containers: - - image: "europe-docker.pkg.dev/kyma-project/prod/testimages/e2e-dind-nodejs:v20240617-cb2ed184" - securityContext: - privileged: false - seccompProfile: - type: RuntimeDefault - allowPrivilegeEscalation: false - command: - - "/home/prow/go/src/github.com/kyma-project/test-infra/prow/scripts/reconciler/reconciler-e2e-nightly-gardener.sh" - env: - - name: GARDENER_REGION - value: "europe-west4" - - name: GARDENER_ZONES - value: "europe-west4-b" - - name: INPUT_CLUSTER_NAME - value: "rec-main" - - name: KYMA_PROJECT_DIR - value: "/home/prow/go/src/github.com/kyma-project" - resources: - requests: - memory: 3Gi - cpu: 2 - \ No newline at end of file diff --git a/prow/jobs/kyma-project/control-plane/control-plane-reconciler-integration.yaml b/prow/jobs/kyma-project/control-plane/control-plane-reconciler-integration.yaml deleted file mode 100644 index c7fcd6422fae..000000000000 --- a/prow/jobs/kyma-project/control-plane/control-plane-reconciler-integration.yaml +++ /dev/null @@ -1,111 +0,0 @@ -# Code generated by rendertemplates. DO NOT EDIT. - - -presubmits: # runs on PRs - kyma-project/control-plane: - - name: pre-main-control-plane-reconciler-e2e - annotations: - description: "control-plane reconciler e2e test" - owner: "jellyfish" - labels: - prow.k8s.io/pubsub.project: "sap-kyma-prow" - prow.k8s.io/pubsub.runID: "pre-main-control-plane-reconciler-e2e" - prow.k8s.io/pubsub.topic: "prowjobs" - preset-cluster-version: "true" - preset-gardener-gcp-kyma-integration: "true" - preset-kyma-cli-stable: "true" - run_if_changed: '^resources/kcp/values.yaml|^resources/kcp/charts/mothership-reconciler/|^resources/kcp/charts/component-reconcilers/' - optional: true - skip_report: false - decorate: true - cluster: untrusted-workload - max_concurrency: 10 - branches: - - ^master$ - - ^main$ - extra_refs: - - org: kyma-project - repo: kyma - base_ref: main - - org: kyma-incubator - repo: reconciler - base_ref: main - - org: kyma-project - repo: test-infra - base_ref: main - spec: - containers: - - image: "europe-docker.pkg.dev/kyma-project/prod/testimages/e2e-dind-nodejs:v20240617-cb2ed184" - securityContext: - privileged: false - seccompProfile: - type: RuntimeDefault - allowPrivilegeEscalation: false - command: - - "/home/prow/go/src/github.com/kyma-project/test-infra/prow/scripts/reconciler/reconciler-e2e-gardener.sh" - env: - - name: GARDENER_REGION - value: "europe-west4" - - name: GARDENER_ZONES - value: "europe-west4-b" - - name: KYMA_PROJECT_DIR - value: "/home/prow/go/src/github.com/kyma-project" - resources: - requests: - memory: 3Gi - cpu: 2 - - name: pre-main-control-plane-reconciler-e2e-latest-release - annotations: - description: "control-plane reconciler e2e test" - owner: "jellyfish" - labels: - prow.k8s.io/pubsub.project: "sap-kyma-prow" - prow.k8s.io/pubsub.runID: "pre-main-control-plane-reconciler-e2e-latest-release" - prow.k8s.io/pubsub.topic: "prowjobs" - preset-cluster-version: "true" - preset-gardener-gcp-kyma-integration: "true" - preset-kyma-cli-stable: "true" - preset-kyma-guard-bot-github-token: "true" - run_if_changed: '^resources/kcp/values.yaml|^resources/kcp/charts/mothership-reconciler/|^resources/kcp/charts/component-reconcilers/' - optional: true - skip_report: false - decorate: true - cluster: untrusted-workload - max_concurrency: 10 - branches: - - ^master$ - - ^main$ - extra_refs: - - org: kyma-project - repo: kyma - base_ref: main - - org: kyma-incubator - repo: reconciler - base_ref: main - - org: kyma-project - repo: test-infra - base_ref: main - spec: - containers: - - image: "europe-docker.pkg.dev/kyma-project/prod/testimages/e2e-dind-nodejs:v20240617-cb2ed184" - securityContext: - privileged: false - seccompProfile: - type: RuntimeDefault - allowPrivilegeEscalation: false - command: - - "/home/prow/go/src/github.com/kyma-project/test-infra/prow/scripts/reconciler/reconciler-e2e-gardener.sh" - env: - - name: GARDENER_REGION - value: "europe-west4" - - name: GARDENER_ZONES - value: "europe-west4-b" - - name: KYMA_PROJECT_DIR - value: "/home/prow/go/src/github.com/kyma-project" - - name: KYMA_TEST_SOURCE - value: "latest-release" - resources: - requests: - memory: 3Gi - cpu: 2 - \ No newline at end of file diff --git a/prow/jobs/kyma-project/control-plane/control-plane-reconciler-upgrade-kyma2-latest-to-main-gardener.yaml b/prow/jobs/kyma-project/control-plane/control-plane-reconciler-upgrade-kyma2-latest-to-main-gardener.yaml deleted file mode 100644 index 3cc73f19f2e0..000000000000 --- a/prow/jobs/kyma-project/control-plane/control-plane-reconciler-upgrade-kyma2-latest-to-main-gardener.yaml +++ /dev/null @@ -1,58 +0,0 @@ -# Code generated by rendertemplates. DO NOT EDIT. - - -presubmits: # runs on PRs - kyma-project/control-plane: - - name: pull-control-plane-rec-upgrade-kyma2-stable-to-main-grdnr - annotations: - description: "control-plane reconciler e2e test" - owner: "jellyfish" - labels: - prow.k8s.io/pubsub.project: "sap-kyma-prow" - prow.k8s.io/pubsub.runID: "pull-control-plane-rec-upgrade-kyma2-stable-to-main-grdnr" - prow.k8s.io/pubsub.topic: "prowjobs" - preset-bot-github-token: "true" - preset-cluster-version: "true" - preset-gardener-gcp-kyma-integration: "true" - preset-kyma-cli-stable: "true" - run_if_changed: '^resources/kcp/values.yaml|^resources/kcp/charts/mothership-reconciler/|^resources/kcp/charts/component-reconcilers/' - optional: true - skip_report: false - decorate: true - cluster: untrusted-workload - max_concurrency: 10 - branches: - - ^master$ - - ^main$ - extra_refs: - - org: kyma-project - repo: kyma - base_ref: main - - org: kyma-incubator - repo: reconciler - base_ref: main - - org: kyma-project - repo: test-infra - base_ref: main - spec: - containers: - - image: "europe-docker.pkg.dev/kyma-project/prod/testimages/e2e-dind-nodejs:v20240617-cb2ed184" - securityContext: - privileged: false - seccompProfile: - type: RuntimeDefault - allowPrivilegeEscalation: false - command: - - "/home/prow/go/src/github.com/kyma-project/test-infra/prow/scripts/reconciler/reconciler-upgrade-kyma2-latest-to-main-gardener.sh" - env: - - name: GARDENER_REGION - value: "europe-west4" - - name: GARDENER_ZONES - value: "europe-west4-b" - - name: KYMA_PROJECT_DIR - value: "/home/prow/go/src/github.com/kyma-project" - resources: - requests: - memory: 3Gi - cpu: 2 - \ No newline at end of file diff --git a/prow/jobs/kyma-project/test-infra/pjconfigtests.yaml b/prow/jobs/kyma-project/test-infra/pjconfigtests.yaml index 9e73eb7fd02d..a94ea8282d8d 100644 --- a/prow/jobs/kyma-project/test-infra/pjconfigtests.yaml +++ b/prow/jobs/kyma-project/test-infra/pjconfigtests.yaml @@ -895,45 +895,6 @@ presubmits: # runs on PRs memory: 100M cpu: 200m - kyma-incubator/reconciler: - - name: pull-reconciler-pjconfigtest - annotations: - description: "Run ginkgo suite tests for prowjobs definitions for reconciler" - owner: "neighbors" - labels: - prow.k8s.io/pubsub.project: "sap-kyma-prow" - prow.k8s.io/pubsub.runID: "pull-reconciler-pjconfigtest" - prow.k8s.io/pubsub.topic: "prowjobs" - run_if_changed: '^.prow/|^.prow.yaml' - skip_report: false - decorate: true - cluster: untrusted-workload - max_concurrency: 10 - branches: - - ^.*$ - extra_refs: - - org: kyma-project - repo: test-infra - base_ref: main - spec: - containers: - - image: "europe-docker.pkg.dev/kyma-project/prod/test-infra/ginkgo:v20240429-870ea518" - imagePullPolicy: Always - securityContext: - privileged: false - seccompProfile: - type: RuntimeDefault - allowPrivilegeEscalation: false - command: - - "/ginkgo" - args: - - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" - resources: - requests: - memory: 100M - cpu: 200m - kyma-incubator/compass-console: - name: pull-compass-console-pjconfigtest annotations: diff --git a/prow/jobs/kyma-project/test-infra/pjtester.yaml b/prow/jobs/kyma-project/test-infra/pjtester.yaml index c3ed5508e971..714ee955a94a 100644 --- a/prow/jobs/kyma-project/test-infra/pjtester.yaml +++ b/prow/jobs/kyma-project/test-infra/pjtester.yaml @@ -2022,94 +2022,6 @@ presubmits: # runs on PRs memory: 100M cpu: 200m - kyma-incubator/reconciler: - - name: pull-reconciler-pjtester - annotations: - description: "Schedule prowjobs tests using pjtester for reconciler" - owner: "neighbors" - labels: - prow.k8s.io/pubsub.project: "sap-kyma-prow" - prow.k8s.io/pubsub.runID: "pull-reconciler-pjtester" - prow.k8s.io/pubsub.topic: "prowjobs" - run_if_changed: '^(vpath/pjtester.yaml)' - skip_report: false - decorate: true - cluster: trusted-workload - max_concurrency: 10 - branches: - - ^.*$ - extra_refs: - - org: kyma-project - repo: test-infra - base_ref: main - spec: - containers: - - image: "europe-docker.pkg.dev/kyma-project/prod/test-infra/ko/pjtester:v20240617-3394fef2" - imagePullPolicy: Always - securityContext: - privileged: false - seccompProfile: - type: RuntimeDefault - allowPrivilegeEscalation: false - command: - - "/ko-app/pjtester" - args: - - "--github-token-path=/etc/github/oauth" - env: - - name: KUBECONFIG_PATH - value: "/etc/kubeconfig/pjtester/config" - resources: - requests: - memory: 100M - cpu: 200m - volumeMounts: - - name: oauth - mountPath: /etc/github - readOnly: true - - name: pjtester-kubeconfig - mountPath: /etc/kubeconfig/pjtester - readOnly: true - volumes: - - name: oauth - secret: - secretName: pjtester-github-oauth-token - - name: pjtester-kubeconfig - secret: - secretName: pjtester-kubeconfig - - name: pull-reconciler-vpathguard - annotations: - description: "Run pjtester vpathguard for reconciler" - owner: "neighbors" - labels: - prow.k8s.io/pubsub.project: "sap-kyma-prow" - prow.k8s.io/pubsub.runID: "pull-reconciler-vpathguard" - prow.k8s.io/pubsub.topic: "prowjobs" - run_if_changed: '^(vpath/pjtester.yaml)' - skip_report: false - decorate: true - cluster: untrusted-workload - max_concurrency: 10 - branches: - - ^.*$ - spec: - containers: - - image: "europe-docker.pkg.dev/kyma-project/prod/testimages/alpine:v20240617-cb2ed184" - imagePullPolicy: Always - securityContext: - privileged: false - seccompProfile: - type: RuntimeDefault - allowPrivilegeEscalation: false - command: - - "/bin/ash" - args: - - "-c" - - "if [ -d /home/prow/go/src/github.com/kyma-project/test-infra/vpath ]; then (echo \"Directory vpath is present. Remove it to merge PR\"; exit 1); else (echo \"Directory vpath is not present\"; exit 0); fi" - resources: - requests: - memory: 100M - cpu: 200m - kyma-incubator/compass-console: - name: pull-compass-console-pjtester annotations: diff --git a/prow/scripts/reconciler/common.sh b/prow/scripts/reconciler/common.sh deleted file mode 100755 index cdf72c02c99d..000000000000 --- a/prow/scripts/reconciler/common.sh +++ /dev/null @@ -1,432 +0,0 @@ -#!/usr/bin/env bash - -readonly RECONCILER_SUFFIX="-reconciler" -readonly RECONCILER_NAMESPACE=reconciler -readonly RECONCILER_TIMEOUT=1200 # in secs -readonly RECONCILER_DELAY=15 # in secs - - -function reconciler::export_nightly_cluster_name(){ - echo ">>> Export nightly cluster name" - day="$(date +%a | tr "[:upper:]" "[:lower:]" | cut -c1-2)" - export INPUT_CLUSTER_NAME="${INPUT_CLUSTER_NAME}-${day}" -} - -function reconciler::delete_cluster_if_exists(){ - echo ">>> Delete cluster with reconciler if exists" - export KUBECONFIG="${GARDENER_KYMA_PROW_KUBECONFIG}" - for i in mo tu we th fr sa su - do - local name="${INPUT_CLUSTER_NAME}-${i}" - local namespace="garden-${GARDENER_KYMA_PROW_PROJECT_NAME}" - set +e - existing_shoot=$(kubectl get shoot "${name}" -ojsonpath="{ .metadata.name }") - if [ -n "${existing_shoot}" ]; then - echo "Cluster found and deleting '${name}'" - kubectl annotate shoot "${name}" confirmation.gardener.cloud/deletion=true \ - --overwrite \ - -n "${namespace}" \ - --kubeconfig "${GARDENER_KYMA_PROW_KUBECONFIG}" - kubectl delete shoot "${name}" \ - --wait=true \ - --kubeconfig "${GARDENER_KYMA_PROW_KUBECONFIG}" \ - -n "${namespace}" - - echo "We wait 120s for Gardener Shoot to settle after cluster deletion" - sleep 120 - else - echo "Cluster '${name}' does not exist" - fi - set -e - done -} - -# reconciler::reprovision_cluster will generate new cluster name -# and start provisioning again -function reconciler::reprovision_cluster() { - echo "cluster provisioning failed, trying provision new cluster" - echo "cleaning damaged cluster first" - local namespace="garden-${GARDENER_KYMA_PROW_PROJECT_NAME}" - - kubectl annotate shoot "${INPUT_CLUSTER_NAME}" confirmation.gardener.cloud/deletion=true \ - --overwrite \ - -n "${namespace}" \ - --kubeconfig "${GARDENER_KYMA_PROW_KUBECONFIG}" - kubectl delete shoot "${INPUT_CLUSTER_NAME}" \ - --wait=true \ - --kubeconfig "${GARDENER_KYMA_PROW_KUBECONFIG}" \ - -n "${namespace}" - echo "building new cluster name" - - reconciler::provision_cluster -} - -function reconciler::provision_cluster() { - echo "Provision reconciler cluster" - export KUBECONFIG="${GARDENER_KYMA_PROW_KUBECONFIG}" - export DOMAIN_NAME="${INPUT_CLUSTER_NAME}" - echo "Creating cluster: ${INPUT_CLUSTER_NAME}" - - # catch cluster provisioning errors and try provision new one - trap reconciler::reprovision_cluster ERR - - set +e - # create the cluster - cat <>> Deploying Reconciler in the cluster" - make -C tools/reconciler deploy-reconciler -} - -# Checks whether reconciler is ready -function reconciler::wait_until_is_ready() { - echo ">>> Wait until reconciler is in ready state" - iterationsLeft=$(( RECONCILER_TIMEOUT/RECONCILER_DELAY )) - while : ; do - reconcilerCountDeploys=0 - readyCountDeploys=0 - for deploy in $(kubectl get deploy -n "${RECONCILER_NAMESPACE}" -ojsonpath='{ .items[*].metadata.name }'); do - case $deploy in *"$RECONCILER_SUFFIX") - reconcilerCountDeploys=$(( reconcilerCountDeploys+1 )) - specReplicas=$(kubectl get deploy -n "${RECONCILER_NAMESPACE}" "${deploy}" -ojsonpath="{ .spec.replicas }") - readyReplicas=$(kubectl get deploy -n "${RECONCILER_NAMESPACE}" "${deploy}" -ojsonpath="{ .status.readyReplicas }") - if [[ specReplicas -eq readyReplicas ]]; then - readyCountDeploys=$(( readyCountDeploys+1 )) - fi - ;; - esac - done - - if [ "${reconcilerCountDeploys}" -eq "${readyCountDeploys}" ] ; then - echo "Reconciler is successfully installed" - break - fi - - if [ "$RECONCILER_TIMEOUT" -ne 0 ] && [ "$iterationsLeft" -le 0 ]; then - echo "Current state of pods in reconciler namespace" - pods_info=$(kubectl get po -n "${RECONCILER_NAMESPACE}") - echo "${pods_info}" - echo "Timeout reached while waiting for reconciler to be ready. Exiting" - exit 1 - fi - sleep $RECONCILER_DELAY - iterationsLeft=$(( iterationsLeft-1 )) - done -} - -# Waits until the test-pod is in ready state -function reconciler::wait_until_test_pod_is_ready() { - echo ">>> Wait until test-pod is in ready state" - iterationsLeft=$(( RECONCILER_TIMEOUT/RECONCILER_DELAY )) - while : ; do - testPodStatus=$(kubectl get po -n "${RECONCILER_NAMESPACE}" test-pod -ojsonpath='{.status.containerStatuses[?(@.name == "test-pod")].ready}') - if [ "${testPodStatus}" = "true" ]; then - echo "Test pod is ready" - break - fi - if [ "$RECONCILER_TIMEOUT" -ne 0 ] && [ "$iterationsLeft" -le 0 ]; then - echo "Timeout reached while initializing test pod. Exiting" - exit 1 - fi - echo "Waiting for test pod to be ready..." - sleep $RECONCILER_DELAY - iterationsLeft=$(( iterationsLeft-1 )) - done -} - -# Waits until the test-pod is deleted completely -function reconciler::wait_until_test_pod_is_deleted() { - iterationsLeft=$(( RECONCILER_TIMEOUT/RECONCILER_DELAY )) - while : ; do - testPodName=$(kubectl get po -n "${RECONCILER_NAMESPACE}" test-pod -ojsonpath='{.metadata.name}' --ignore-not-found) - if [ -z "${testPodName}" ]; then - echo "Test pod is deleted" - break - fi - if [ "$RECONCILER_TIMEOUT" -ne 0 ] && [ "$iterationsLeft" -le 0 ]; then - echo "Timeout reached while initializing test pod. Exiting" - exit 1 - fi - echo "Waiting for test pod to be deleted..." - sleep $RECONCILER_DELAY - iterationsLeft=$(( iterationsLeft-1 )) - done -} - -# Initializes test pod which will send reconcile requests to reconciler -function reconciler::initialize_test_pod() { - echo ">>> Set up test pod environment" - if [[ ! $KYMA_UPGRADE_SOURCE ]]; then - KYMA_UPGRADE_SOURCE="main" - fi - echo "Kyma version to reconcile: ${KYMA_UPGRADE_SOURCE}" - - # move to reconciler directory - if [ ! -f "resources/kcp/charts/mothership-reconciler/values.yaml" ]; then - echo "Mothership reconciler values file not found! (resources/kcp/charts/mothership-reconciler/values.yaml)" - exit 1 - fi - echo "************* Current Reconciler Image To Be Used **************" - cat < "resources/kcp/charts/mothership-reconciler/values.yaml" | grep -o 'mothership_reconciler.*\"' - echo "****************************************************************" - # Create reconcile request payload with kubeconfig, domain, and version to the test-pod - domain="$(kubectl get cm shoot-info -n kube-system -o jsonpath='{.data.domain}')" - - # shellcheck disable=SC2086 - kc="$(cat ${KUBECONFIG})" - - pushd "tools/reconciler" || { echo "Failed to change dir to: tools/reconciler"; exit 1; } - local tplFile="./e2e-test/template-kyma-main.json" - if [[ "$KYMA_UPGRADE_SOURCE" =~ ^2\.19\.[0-9]+$ ]] ; then - tplFile="./e2e-test/template-kyma-2-19.json" - fi - echo "Calling reconciler by using JSON template '$tplFile' as payload" - - sed -i "s/example.com/$domain/" "$tplFile" - # shellcheck disable=SC2016 - jq --arg kubeconfig "${kc}" --arg version "${KYMA_UPGRADE_SOURCE}" '.kubeconfig = $kubeconfig | .kymaConfig.version = $version' "$tplFile" > body.json - - # Copy the reconcile request payload and kyma reconciliation scripts to the test-pod - tar -zcvf - ./body.json e2e-test/*.sh | kubectl exec -i -n "${RECONCILER_NAMESPACE}" test-pod -c test-pod -- tar -zxvf - -C /tmp --strip-components=1 - popd -} - -# Only triggers reconciliation of Kyma -function reconciler::trigger_kyma_reconcile() { - # Trigger Kyma reconciliation using reconciler - echo ">>> Trigger the reconciliation through test pod" - echo "Reconcile Kyma in the same cluster" - kubectl exec -n "${RECONCILER_NAMESPACE}" test-pod -c test-pod -- sh -c ". /tmp/request-reconcile.sh" - if [[ $? -ne 0 ]]; then - echo "Failed to trigger reconciliation" - exit 1 - fi -} - -# Waits until Kyma reconciliation is in ready state -function reconciler::wait_until_kyma_reconciled() { - echo ">>> Wait until reconciliation is complete" - iterationsLeft=$(( RECONCILER_TIMEOUT/RECONCILER_DELAY )) - while : ; do - status=$(kubectl exec -n "${RECONCILER_NAMESPACE}" test-pod -c test-pod -- sh -c ". /tmp/get-reconcile-status.sh" | xargs || true) - - if [ -z "${status}" ]; then - echo "Failed to retrieve reconciliation status. Retrying previous call in debug mode" - kubectl exec -v=8 -n "${RECONCILER_NAMESPACE}" test-pod -c test-pod -- sh -c ". /tmp/get-reconcile-status.sh" || true - status=$(kubectl exec -n "${RECONCILER_NAMESPACE}" test-pod -c test-pod -- sh -c ". /tmp/get-reconcile-status.sh" | xargs || true) - fi - - if [ "${status}" = "ready" ]; then - echo "Kyma is reconciled" - break - fi - - if [ "${status}" = "error" ]; then - echo "Failed to reconcile Kyma. Exiting" - kubectl logs -n "${RECONCILER_NAMESPACE}" -l app.kubernetes.io/name=mothership-reconciler -c mothership-reconciler --tail -1 - exit 1 - fi - - if [ -z "${status}" ]; then - echo "Failed to retrieve reconciliation status. Checking if API server is reachable by asking for its version" - kubectl version -v=8 - fi - - if [ "$RECONCILER_TIMEOUT" -ne 0 ] && [ "$iterationsLeft" -le 0 ]; then - echo "Timeout reached on Kyma reconciliation. Exiting" - kubectl logs -n "${RECONCILER_NAMESPACE}" -l app.kubernetes.io/name=mothership-reconciler -c mothership-reconciler --tail -1 - exit 1 - fi - - sleep $RECONCILER_DELAY - echo "Waiting for reconciliation to finish, current status: ${status} ...." - iterationsLeft=$(( iterationsLeft-1 )) - done -} - -# Deploy test pod -function reconciler::deploy_test_pod() { - # Deploy a test pod - echo ">>> Deploy test-pod in the cluster which will trigger reconciliation" - test_pod_name=$(kubectl get po test-pod -n "${RECONCILER_NAMESPACE}" -ojsonpath="{ .metadata.name }" --ignore-not-found) - if [ -n "${test_pod_name}" ]; then - echo "Found existing pod: test-pod" - kubectl delete po test-pod -n "${RECONCILER_NAMESPACE}" - reconciler::wait_until_test_pod_is_deleted - fi - kubectl run -n "${RECONCILER_NAMESPACE}" --image=alpine:3.14.1 --restart=Never test-pod -- sh -c "sleep 36000" -} - -function reconciler::disable_sidecar_injection_reconciler_ns() { - echo ">>> Disabling sidecar injection for reconciler namespace" - kubectl label namespace "${RECONCILER_NAMESPACE}" istio-injection=disabled --overwrite -} - -# Export shoot cluster kubeconfig to ENV -function reconciler::export_shoot_cluster_kubeconfig() { - echo "Export shoot cluster kubeconfig to ENV" - export KUBECONFIG="${GARDENER_KYMA_PROW_KUBECONFIG}" - local shoot_kubeconfig="/tmp/shoot-kubeconfig.yaml" - cat < "${shoot_kubeconfig}" -{ - "apiVersion": "authentication.gardener.cloud/v1alpha1", - "kind": "AdminKubeconfigRequest", - "spec": { - "expirationSeconds": 10800 - } -} -EOF - export KUBECONFIG="${shoot_kubeconfig}" -} - -# Break Kyma to test reconciler repair mechanism -function reconciler::break_kyma() { - echo "Delete all deployments from kyma-system ns" - kubectl delete deploy -n kyma-system --all -} - -function utils::check_required_vars() { - echo "Checks if all provided variables are initialized" - local discoverUnsetVar=false - for var in "$@"; do - if [ -z "${!var}" ] ; then - echo "ERROR: $var is not set" - discoverUnsetVar=true - fi - done - if [ "${discoverUnsetVar}" = true ] ; then - exit 1 - fi -} - -utils::generate_commonName() { - - local OPTIND - - while getopts ":n:p:" opt; do - case $opt in - n) - local namePrefix="$OPTARG" ;; - p) - local id="$OPTARG" ;; - \?) - echo "Invalid option: -$OPTARG" >&2; exit 1 ;; - :) - echo "Option -$OPTARG argument not provided" >&2; ;; - esac - done - - namePrefix=$(echo "$namePrefix" | tr '_' '-') - namePrefix=${namePrefix#-} - - local randomNameSuffix - randomNameSuffix=$(LC_ALL=C tr -dc 'a-z0-9' < /dev/urandom | head -c6) - # return value - # shellcheck disable=SC2034 - utils_generate_commonName_return_commonName=$(echo "$namePrefix$id$randomNameSuffix" | tr "[:upper:]" "[:lower:]" ) -} - -gardener::cleanup() { - #!!! Must be at the beginning of this function !!! - EXIT_STATUS=$? - - if [ "${ERROR_LOGGING_GUARD}" = "true" ]; then - echo "AN ERROR OCCURED! Take a look at preceding log entries." - fi - - #Turn off exit-on-error so that next step is executed even if previous one fails. - set +e - - # describe nodes to file in artifacts directory - kubectl describe nodes > "$ARTIFACTS/kubectl_describe.log" - - if [[ "${CLEANUP_CLUSTER}" == "true" ]] ; then - local namespace="garden-${GARDENER_KYMA_PROW_PROJECT_NAME}" - echo "Deprovision cluster: \"${CLUSTER_NAME}\"" - kubectl annotate shoot "${CLUSTER_NAME}" confirmation.gardener.cloud/deletion=true \ - --overwrite \ - -n "${namespace}" \ - --kubeconfig "${GARDENER_KYMA_PROW_KUBECONFIG}" - kubectl delete shoot "${CLUSTER_NAME}" \ - --wait=true \ - --kubeconfig "${GARDENER_KYMA_PROW_KUBECONFIG}" \ - -n "${namespace}" - fi - - MSG="" - if [[ ${EXIT_STATUS} -ne 0 ]]; then MSG="(exit status: ${EXIT_STATUS})"; fi - echo "Job is finished ${MSG}" - set -e - - exit "${EXIT_STATUS}" -} diff --git a/prow/scripts/reconciler/reconciler-e2e-gardener.sh b/prow/scripts/reconciler/reconciler-e2e-gardener.sh deleted file mode 100755 index 3b4b0e943a75..000000000000 --- a/prow/scripts/reconciler/reconciler-e2e-gardener.sh +++ /dev/null @@ -1,109 +0,0 @@ -#!/usr/bin/env bash - -#Description: Kyma CLI Integration plan on Gardener. This scripts implements a pipeline that consists of many steps. The purpose is to install and test Reconciler end-to-end flow on a real Gardener cluster. -# -#Expected common vars: -# - JOB_TYPE - set up by prow (presubmit, postsubmit, periodic) -# - KYMA_PROJECT_DIR - directory path with Kyma sources to use for installation -# - GARDENER_REGION - Gardener compute region -# - GARDENER_ZONES - Gardener compute zones inside the region -# - GARDENER_CLUSTER_VERSION - Version of the Kubernetes cluster -# - GARDENER_KYMA_PROW_KUBECONFIG - Kubeconfig of the Gardener service account -# - GARDENER_KYMA_PROW_PROJECT_NAME - Name of the gardener project where the cluster will be integrated. -# - GARDENER_KYMA_PROW_PROVIDER_SECRET_NAME - Name of the secret configured in the gardener project to access the cloud provider -# - MACHINE_TYPE - (optional) machine type -# -#Please look in each provider script for provider specific requirements - -## --------------------------------------------------------------------------------------- -## Configurations and Variables -## --------------------------------------------------------------------------------------- - -# exit on error, and raise error when variable is not set when used -set -e -pwd - -# Exported variables -# KYMA_SOURCE set to dummy value, required by gardener/gcp.sh -export KYMA_SOURCE="main" - -# shellcheck source=prow/scripts/reconciler/common.sh -source "../../kyma-project/test-infra/prow/scripts/reconciler/common.sh" - -# All provides require these values, each of them may check for additional variables -requiredVars=( - GARDENER_PROVIDER - KYMA_PROJECT_DIR - GARDENER_REGION - GARDENER_ZONES - GARDENER_CLUSTER_VERSION - GARDENER_KYMA_PROW_KUBECONFIG - GARDENER_KYMA_PROW_PROJECT_NAME - GARDENER_KYMA_PROW_PROVIDER_SECRET_NAME -) - -utils::check_required_vars "${requiredVars[@]}" - -trap gardener::cleanup EXIT INT - -# Used to detect errors for logging purposes -ERROR_LOGGING_GUARD="true" -export ERROR_LOGGING_GUARD - -readonly COMMON_NAME_PREFIX="grd" -utils::generate_commonName -n "${COMMON_NAME_PREFIX}" - -export INPUT_CLUSTER_NAME="${utils_generate_commonName_return_commonName:?}" -# This is needed for the gardener::cleanup function -export CLUSTER_NAME="${INPUT_CLUSTER_NAME}" - -# set Kyma version to reconcile -if [[ $KYMA_TEST_SOURCE == "latest-release" ]]; then - # Fetch latest Kyma2 release - - pushd ../../kyma-project/kyma - git remote add origin https://github.com/kyma-project/kyma.git - git reset --hard && git remote update && git fetch --tags --all >/dev/null 2>&1 - kyma_get_last_release_version_return_version=$(git tag -l '[0-9]*.[0-9]*.[0-9]*'| sort -r -V | grep '^[^-rc]*$'| head -n1) - export KYMA_UPGRADE_SOURCE="${kyma_get_last_release_version_return_version:?}" - git reset --hard && git checkout tags/"${KYMA_UPGRADE_SOURCE}" - popd -fi - -## --------------------------------------------------------------------------------------- -## Prow job execution steps -## --------------------------------------------------------------------------------------- - -echo ">>> Provisioning Gardener cluster" - -# Provision garderner cluster -export CLEANUP_CLUSTER="true" -reconciler::provision_cluster - -reconciler::export_shoot_cluster_kubeconfig - -# Deploy reconciler -reconciler::deploy - -# Wait until reconciler is ready -reconciler::wait_until_is_ready - -# Deploy test pod which will trigger reconciliation -reconciler::deploy_test_pod - -# Wait until test-pod is ready -reconciler::wait_until_test_pod_is_ready - -# Set up test pod environment -reconciler::initialize_test_pod - -# Trigger the reconciliation through test pod -reconciler::trigger_kyma_reconcile - -# Wait until reconciliation is complete -reconciler::wait_until_kyma_reconciled - -#!!! Must be at the end of the script !!! -ERROR_LOGGING_GUARD="false" - -gardener::cleanup diff --git a/prow/scripts/reconciler/reconciler-e2e-nightly-gardener.sh b/prow/scripts/reconciler/reconciler-e2e-nightly-gardener.sh deleted file mode 100755 index 11b8de340ea3..000000000000 --- a/prow/scripts/reconciler/reconciler-e2e-nightly-gardener.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env bash - -#Description: Reconciler E2E test plan on gardener. This scripts implements a pipeline that consists of many steps. The purpose is to install and test Reconciler end-to-end flow on a real Gardener cluster. -#Please look in each provider script for provider specific requirements - -## --------------------------------------------------------------------------------------- -## Configurations and Variables -## --------------------------------------------------------------------------------------- - -# exit on error, and raise error when variable is not set when used -set -e - -pwd -# shellcheck source=prow/scripts/reconciler/common.sh -source "../../kyma-project/test-infra/prow/scripts/reconciler/common.sh" - -# All provides require these values, each of them may check for additional variables -requiredVars=( - GARDENER_PROVIDER - KYMA_PROJECT_DIR - GARDENER_REGION - GARDENER_ZONES - GARDENER_CLUSTER_VERSION - GARDENER_KYMA_PROW_KUBECONFIG - GARDENER_KYMA_PROW_PROJECT_NAME - GARDENER_KYMA_PROW_PROVIDER_SECRET_NAME - INPUT_CLUSTER_NAME -) - -utils::check_required_vars "${requiredVars[@]}" - -reconciler::export_nightly_cluster_name - -echo "Connecting to nightly cluster" - -reconciler::export_shoot_cluster_kubeconfig - -reconciler::deploy_test_pod - -reconciler::wait_until_test_pod_is_ready - -reconciler::initialize_test_pod - -reconciler::trigger_kyma_reconcile - -reconciler::wait_until_kyma_reconciled - -reconciler::break_kyma diff --git a/prow/scripts/reconciler/reconciler-gardener-long-lasting.sh b/prow/scripts/reconciler/reconciler-gardener-long-lasting.sh deleted file mode 100755 index 8501915ab33a..000000000000 --- a/prow/scripts/reconciler/reconciler-gardener-long-lasting.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -o pipefail - -#Description: Kyma CLI Integration plan on Gardener. This scripts implements a pipeline that consists of many steps. The purpose is to install and test Kyma using the CLI on a real Gardener cluster. -#Please look in each provider script for provider specific requirements - -# THIS SCRIPT WILL START FROM ROOT OF RECONCILER - -# shellcheck source=prow/scripts/reconciler/common.sh -source "../../kyma-project/test-infra/prow/scripts/reconciler/common.sh" - -# All provides require these values, each of them may check for additional variables -requiredVars=( - GARDENER_REGION - GARDENER_ZONES - GARDENER_KYMA_PROW_KUBECONFIG - GARDENER_KYMA_PROW_PROJECT_NAME - GARDENER_KYMA_PROW_PROVIDER_SECRET_NAME - INPUT_CLUSTER_NAME -) - -utils::check_required_vars "${requiredVars[@]}" - -if ! command -v helm &> /dev/null ; then - echo "helm not found" - mkdir -p bin - HELM_VERSION=v3.12.1 - curl -Lo helm.tar.gz "https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz" && \ - tar -xzOf helm.tar.gz linux-amd64/helm > bin/helm && \ - chmod +x bin/helm - export PATH="$PWD/bin:$PATH" -fi -reconciler::delete_cluster_if_exists - -reconciler::export_nightly_cluster_name - -reconciler::provision_cluster - -reconciler::export_shoot_cluster_kubeconfig - -reconciler::deploy - -reconciler::disable_sidecar_injection_reconciler_ns - -reconciler::wait_until_is_ready \ No newline at end of file diff --git a/prow/scripts/reconciler/reconciler-upgrade-kyma2-latest-to-main-gardener.sh b/prow/scripts/reconciler/reconciler-upgrade-kyma2-latest-to-main-gardener.sh deleted file mode 100755 index 941502b5b115..000000000000 --- a/prow/scripts/reconciler/reconciler-upgrade-kyma2-latest-to-main-gardener.sh +++ /dev/null @@ -1,155 +0,0 @@ -#!/usr/bin/env bash - -# Description: Kyma CLI Integration plan on Gardener. This scripts implements a pipeline that consists of many steps. -# The script does the following steps in order: -# 1. Provision a gardener cluster. -# 2. Deploy the Kyma reconciler from the control-plane pull-request. -# 3. Reconcile Kyma2 latest release using the deployed Kyma reconciler. -# 4. Reconcile Kyma2 main using the deployed Kyma reconciler (to simulate Kyma2 version upgrade). -# -# Expected common vars: -# - JOB_TYPE - set up by prow (presubmit, postsubmit, periodic) -# - KYMA_PROJECT_DIR - directory path with Kyma sources to use for installation -# - GARDENER_REGION - Gardener compute region -# - GARDENER_ZONES - Gardener compute zones inside the region -# - GARDENER_CLUSTER_VERSION - Version of the Kubernetes cluster -# - GARDENER_KYMA_PROW_KUBECONFIG - Kubeconfig of the Gardener service account -# - GARDENER_KYMA_PROW_PROJECT_NAME - Name of the gardener project where the cluster will be integrated. -# - GARDENER_KYMA_PROW_PROVIDER_SECRET_NAME - Name of the secret configured in the gardener project to access the cloud provider -# - BOT_GITHUB_TOKEN: Bot github token used for API queries -# - MACHINE_TYPE - (optional) machine type -# -# Please look in each provider script for provider specific requirements. - -## --------------------------------------------------------------------------------------- -## Configurations and Variables -## --------------------------------------------------------------------------------------- - -# Exit on error, and raise error when variable is not set when used -set -e -pwd - -# shellcheck source=prow/scripts/reconciler/common.sh -source "../../kyma-project/test-infra/prow/scripts/reconciler/common.sh" - -# All provides require these values, each of them may check for additional variables -requiredVars=( - BOT_GITHUB_TOKEN - GARDENER_PROVIDER - KYMA_PROJECT_DIR - GARDENER_REGION - GARDENER_ZONES - GARDENER_CLUSTER_VERSION - GARDENER_KYMA_PROW_KUBECONFIG - GARDENER_KYMA_PROW_PROJECT_NAME - GARDENER_KYMA_PROW_PROVIDER_SECRET_NAME -) - -utils::check_required_vars "${requiredVars[@]}" -# Used to detect errors for logging purposes -ERROR_LOGGING_GUARD="true" -export ERROR_LOGGING_GUARD - -if ! command -v helm &> /dev/null ; then - echo "helm not found" - mkdir -p bin - HELM_VERSION=v3.12.1 - curl -Lo helm.tar.gz "https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz" && \ - tar -xzOf helm.tar.gz linux-amd64/helm > bin/helm && \ - chmod +x bin/helm - export PATH="$PWD/bin:$PATH" -fi - -## --------------------------------------------------------------------------------------- -## Provision Gardener cluster -## --------------------------------------------------------------------------------------- - -# Generate cluster name -readonly COMMON_NAME_PREFIX="grd" -utils::generate_commonName -n "${COMMON_NAME_PREFIX}" - -# Exported variables -export CLEANUP_CLUSTER="true" -export INPUT_CLUSTER_NAME="${utils_generate_commonName_return_commonName:?}" -export CLUSTER_NAME="${INPUT_CLUSTER_NAME}" - -echo ">>> Provision Gardener cluster" -trap gardener::cleanup EXIT INT -reconciler::provision_cluster -reconciler::export_shoot_cluster_kubeconfig - -## --------------------------------------------------------------------------------------- -## Deploy Kyma reconciler -## --------------------------------------------------------------------------------------- - -# Exported variables -export CONTROL_PLANE_RECONCILER_DIR="/home/prow/go/src/github.com/kyma-project/control-plane/tools/reconciler" - -# Deploy reconciler -reconciler::deploy - -# Disable sidecar injection for reconciler namespace -reconciler::disable_sidecar_injection_reconciler_ns - -# Wait until reconciler is ready -reconciler::wait_until_is_ready - -## --------------------------------------------------------------------------------------- -## Reconcile and test Kyma2 latest release -## --------------------------------------------------------------------------------------- - -# Get Kyma2 latest release version - -pushd ../../kyma-project/kyma -git remote add origin https://github.com/kyma-project/kyma.git -git reset --hard && git remote update && git fetch --tags --all >/dev/null 2>&1 -kyma_get_last_release_version_return_version=$(git tag -l '[0-9]*.[0-9]*.[0-9]*'| sort -r -V | grep '^[^-rc]*$'| head -n1) -export KYMA_UPGRADE_SOURCE="${kyma_get_last_release_version_return_version:?}" -git reset --hard && git checkout tags/"${KYMA_UPGRADE_SOURCE}" -popd - -# Set up test pod environment -reconciler::deploy_test_pod -reconciler::wait_until_test_pod_is_ready -reconciler::initialize_test_pod - -# Trigger the reconciliation through test pod -echo ">>> Reconcile Kyma2 version: ${KYMA_UPGRADE_SOURCE}" -reconciler::trigger_kyma_reconcile - -# Wait until reconciliation is complete -reconciler::wait_until_kyma_reconciled - -if [[ $KYMA_UPGRADE_SOURCE != "main" ]]; then - kubectl create namespace kyma-system - kubectl apply -f https://github.com/kyma-project/serverless/releases/latest/download/serverless-operator.yaml - respCode=$(curl -o /dev/null --silent --head --write-out '%{http_code}' https://github.com/kyma-project/serverless/releases/latest/download/default_serverless_cr.yaml) - if [ "$respCode" = "200" ]; then - crdUrl="https://github.com/kyma-project/serverless/releases/latest/download/default_serverless_cr.yaml" - else - crdUrl="https://github.com/kyma-project/serverless/releases/latest/download/default-serverless-cr.yaml" - fi - kubectl apply -f "$crdUrl" -n kyma-system -fi - -## --------------------------------------------------------------------------------------- -## Reconcile and test Kyma2 main -## --------------------------------------------------------------------------------------- - -# Exported variables -export KYMA_UPGRADE_SOURCE="main" - -# Set up test pod environment -reconciler::deploy_test_pod -reconciler::wait_until_test_pod_is_ready -reconciler::initialize_test_pod - -# Trigger the reconciliation through test pod -echo ">>> Reconcile Kyma2 version: ${KYMA_UPGRADE_SOURCE}" -reconciler::trigger_kyma_reconcile - -# Wait until reconciliation is complete -reconciler::wait_until_kyma_reconciled - -# Must be at the end of the script -ERROR_LOGGING_GUARD="false" diff --git a/prow/scripts/reconciler/shoot-template.yaml b/prow/scripts/reconciler/shoot-template.yaml deleted file mode 100644 index 53bf3218de08..000000000000 --- a/prow/scripts/reconciler/shoot-template.yaml +++ /dev/null @@ -1,57 +0,0 @@ -apiVersion: core.gardener.cloud/v1beta1 -kind: Shoot -metadata: - name: $DOMAIN_NAME -spec: - purpose: development - cloudProfileName: gcp - kubernetes: - version: 1.28.6 - provider: - controlPlaneConfig: - apiVersion: gcp.provider.extensions.gardener.cloud/v1alpha1 - kind: ControlPlaneConfig - zone: $GARDENER_ZONES - infrastructureConfig: - apiVersion: gcp.provider.extensions.gardener.cloud/v1alpha1 - kind: InfrastructureConfig - networks: - workers: 10.250.0.0/16 - type: gcp - workers: - - machine: - image: - name: gardenlinux - version: 934.11.0 - type: n1-standard-4 - maxSurge: 1 - maxUnavailable: 0 - maximum: 4 - minimum: 2 - name: worker-dev - volume: - size: 20Gi - type: pd-ssd - zones: - - $GARDENER_ZONES - networking: - nodes: 10.250.0.0/16 - pods: 100.96.0.0/11 - services: 100.64.0.0/13 - type: calico - maintenance: - timeWindow: - begin: 010000+0000 - end: 020000+0000 - autoUpdate: - kubernetesVersion: true - machineImageVersion: true - addons: - kubernetesDashboard: - enabled: false - nginxIngress: - enabled: false - hibernation: - enabled: false - region: $GARDENER_REGION - secretBindingName: $GARDENER_KYMA_PROW_PROVIDER_SECRET_NAME diff --git a/prow/scripts/resources/control-plane-autobump-reconciler-config.yaml b/prow/scripts/resources/control-plane-autobump-reconciler-config.yaml deleted file mode 100644 index 9ecb1e78745d..000000000000 --- a/prow/scripts/resources/control-plane-autobump-reconciler-config.yaml +++ /dev/null @@ -1,16 +0,0 @@ -gitHubLogin: "kyma-bot" -gitHubToken: "/etc/github/token" -gitName: "Kyma Bot" -gitEmail: "kyma.bot@sap.com" -skipPullRequest: false -gitHubOrg: "kyma-project" -gitHubRepo: "control-plane" -remoteName: "control-plane" -includedConfigPaths: - - "resources/kcp/values.yaml" -#headBranchName: "add-free-plan" # target branch for changes push to, default is 'autobump', you can replace this branch for testing purpose. -prefixes: - - name: "Reconciler" - prefix: "eu.gcr.io/kyma-project/incubator/reconciler/" - repo: "https://github.com/kyma-incubator/reconciler" - summarise: true diff --git a/templates/config.yaml b/templates/config.yaml index 3bfea5074fb5..68209fb38379 100644 --- a/templates/config.yaml +++ b/templates/config.yaml @@ -33,7 +33,6 @@ global: repos: - name: "compass" - name: "ord-service" - - name: "reconciler" - name: "compass-console" - name: "sap-btp-service-operator" - name: "slack-bot" @@ -318,12 +317,6 @@ globalSets: - org: "kyma-project" repo: "kyma" base_ref: "main" - extra_refs_reconciler: - extra_refs: - reconciler: - - org: "kyma-incubator" - repo: "reconciler" - base_ref: "main" extra_refs_control-plane: extra_refs: control-plane: diff --git a/templates/data/control-plane-integration-data.yaml b/templates/data/control-plane-integration-data.yaml deleted file mode 100644 index 9b2c03d0d285..000000000000 --- a/templates/data/control-plane-integration-data.yaml +++ /dev/null @@ -1,88 +0,0 @@ -templates: - - from: generic.tmpl - render: - - to: ../../prow/jobs/kyma-project/control-plane/control-plane-reconciler-integration.yaml - localSets: - reconciler_e2e_jobConfig: - command: "/home/prow/go/src/github.com/kyma-project/test-infra/prow/scripts/reconciler/reconciler-e2e-gardener.sh" - reconciler_jobConfig_args: - args: - - "/home/prow/go/src/github.com/kyma-incubator/reconciler" - reconciler_e2e_latest_release_jobConfig: - env: - KYMA_TEST_SOURCE: "latest-release" - labels: - preset-kyma-guard-bot-github-token: "true" - jobConfigs: - - repoName: kyma-project/control-plane - jobs: - - jobConfig: - name: pre-main-control-plane-reconciler-e2e - image: europe-docker.pkg.dev/kyma-project/prod/testimages/e2e-dind-nodejs:v20240617-cb2ed184 - annotations: - owner: jellyfish - description: control-plane reconciler e2e test - run_if_changed: "^resources/kcp/values.yaml|^resources/kcp/charts/mothership-reconciler/|^resources/kcp/charts/component-reconcilers/" - optional: true - inheritedConfigs: - global: - - jobConfig_default - - jobConfig_presubmit - - gardener_gcp_job - - extra_refs_test-infra - - extra_refs_kyma - - extra_refs_reconciler - - unprivileged - local: - - reconciler_e2e_jobConfig - - jobConfig: - name: pre-main-control-plane-reconciler-e2e-latest-release - image: europe-docker.pkg.dev/kyma-project/prod/testimages/e2e-dind-nodejs:v20240617-cb2ed184 - annotations: - owner: jellyfish - description: control-plane reconciler e2e test - run_if_changed: "^resources/kcp/values.yaml|^resources/kcp/charts/mothership-reconciler/|^resources/kcp/charts/component-reconcilers/" - optional: true - inheritedConfigs: - global: - - jobConfig_default - - jobConfig_presubmit - - gardener_gcp_job - - extra_refs_test-infra - - extra_refs_kyma - - extra_refs_reconciler - - unprivileged - local: - - reconciler_e2e_jobConfig - - reconciler_e2e_latest_release_jobConfig - - to: ../../prow/jobs/kyma-project/control-plane/control-plane-reconciler-upgrade-kyma2-latest-to-main-gardener.yaml - localSets: - reconciler_upgrade_jobConfig: - command: "/home/prow/go/src/github.com/kyma-project/test-infra/prow/scripts/reconciler/reconciler-upgrade-kyma2-latest-to-main-gardener.sh" - reconciler_jobConfig_args: - args: - - "/home/prow/go/src/github.com/kyma-incubator/reconciler" - jobConfigs: - - repoName: kyma-project/control-plane - jobs: - - jobConfig: - name: pull-control-plane-rec-upgrade-kyma2-stable-to-main-grdnr - image: europe-docker.pkg.dev/kyma-project/prod/testimages/e2e-dind-nodejs:v20240617-cb2ed184 - annotations: - owner: jellyfish - description: control-plane reconciler e2e test - run_if_changed: "^resources/kcp/values.yaml|^resources/kcp/charts/mothership-reconciler/|^resources/kcp/charts/component-reconcilers/" - labels: - preset-bot-github-token: "true" - optional: true - inheritedConfigs: - global: - - jobConfig_default - - jobConfig_presubmit - - gardener_gcp_job - - extra_refs_test-infra - - extra_refs_kyma - - extra_refs_reconciler - - unprivileged - local: - - reconciler_upgrade_jobConfig diff --git a/templates/data/incubator-buildpack-data.yaml b/templates/data/incubator-buildpack-data.yaml index 7ff9e2ac20d9..d15a10437287 100644 --- a/templates/data/incubator-buildpack-data.yaml +++ b/templates/data/incubator-buildpack-data.yaml @@ -34,288 +34,3 @@ templates: - jobConfig_default - jobConfig_postsubmit - image_buildpack-golang - - to: ../../prow/jobs/kyma-incubator/reconciler/reconciler.yaml - localSets: - extra_refs_kyma-1-24: - extra_refs: - kyma-1-24: - - org: "kyma-project" - repo: "kyma" - base_ref: "release-1.24" - extra_refs_kyma_cli: - extra_refs: - kyma-cli: - - org: "kyma-project" - repo: "cli" - base_ref: "main" - reconciler_main_jobConfig: - command: "/home/prow/go/src/github.com/kyma-project/test-infra/prow/scripts/build-generic.sh" - env: - GO11MODULE: "on" - branches: - - ^main$ - reconciler_load-test-mock_jobConfig: - command: "/home/prow/go/src/github.com/kyma-project/test-infra/prow/scripts/build-generic.sh" - env: - GO11MODULE: "on" - branches: - - ^load-test-mock$ - reconciler_dev_jobConfig: - command: "/home/prow/go/src/github.com/kyma-project/test-infra/prow/scripts/build-generic.sh" - args: - - "/home/prow/go/src/github.com/kyma-incubator/reconciler" - env: - GO11MODULE: "on" - branches: - - ^develop$ - reconciler_e2e_jobConfig: - command: "/home/prow/go/src/github.com/kyma-project/test-infra/prow/scripts/reconciler/reconciler-e2e-gardener.sh" - reconciler_nightly_e2e_jobConfig: - command: "/home/prow/go/src/github.com/kyma-project/test-infra/prow/scripts/reconciler/reconciler-e2e-nightly-gardener.sh" - reconciler_jobConfig_args: - args: - - "/home/prow/go/src/github.com/kyma-incubator/reconciler" - reconciler_nightly_cluster_jobConfig: - command: "/home/prow/go/src/github.com/kyma-project/test-infra/prow/scripts/reconciler/reconciler-gardener-long-lasting.sh" - reconciler_main_nightly_cluster_input_name: - env: - INPUT_CLUSTER_NAME: "rec-main" - reconciler_dev_nightly_cluster_input_name: - env: - INPUT_CLUSTER_NAME: "rec-dev" - reconciler_publish_pr_cli_jobConfig: - command: "/home/prow/go/src/github.com/kyma-project/test-infra/prow/scripts/reconciler-publish-pr-cli.sh" - reconciler_e2e_image: - image: europe-docker.pkg.dev/kyma-project/prod/testimages/e2e-gcloud:v20240617-cb2ed184 - securityContext: #temporary we need permissions to create files before transfer them to remote vm - runAsRoot: true - jobConfigs: - - repoName: kyma-incubator/reconciler - jobs: - - jobConfig: - name: "pre-main-reconciler-unit-test" - annotations: - owner: jellyfish - description: test reconciler - optional: false - always_run: true - command: "/bin/sh" - args: - - "-c" - - "make test" - inheritedConfigs: - global: - - "jobConfig_presubmit" - - testing - - "unprivileged" - - jobConfig: - name: "pre-main-reconciler-lint" - optional: false - command: "/bin/sh" - annotations: - owner: jellyfish - description: lint reconciler - request_memory: "8Gi" - request_cpu: "4" - limits_memory: "8Gi" - limits_cpu: "4" - args: - - "-c" - - golangci-lint run -v --timeout=20m --new-from-rev=$PULL_BASE_SHA ./... - run_if_changed: '^(.*\.go$|.golangci.yaml)' - inheritedConfigs: - global: - - "jobConfig_presubmit" - - linting - - "unprivileged" - - jobConfig: - name: "pre-main-reconciler-publish-pr-cli" - annotations: - owner: jellyfish - description: pre publish reconciler - image: "europe-docker.pkg.dev/kyma-project/prod/testimages/e2e-gcloud:v20240617-cb2ed184" - optional: true - # following regexp won't start build if only Markdown files were changed - run_if_changed: "^((cmd\\S+|configs\\S+|internal\\S+|pkg\\S+)(\\.[^.][^.][^.]+$|\\.[^.][^dD]$|\\.[^mM][^.]$|\\.[^.]$|/[^.]+$))" - labels: - preset-sa-vm-kyma-integration: "true" - preset-gc-project-env: "true" - preset-kyma-cli-pr-unstable: "true" - inheritedConfigs: - global: - - jobConfig_default - - jobConfig_presubmit - - image_buildpack-golang - - extra_refs_test-infra - local: - - extra_refs_kyma_cli - - reconciler_publish_pr_cli_jobConfig - - jobConfig: - name: pre-main-kyma-incubator-mothership-reconciler - image: "europe-docker.pkg.dev/kyma-project/prod/image-builder:v20240617-9b64b6ff" - annotations: - owner: jellyfish - description: build mothership reconciler - args: - - "--name=incubator/reconciler/mothership" - - "--config=/config/kaniko-build-config.yaml" - - "--context=." - - "--dockerfile=Dockerfile.mr" - always_run: true - branches: - - ^main$ - inheritedConfigs: - global: - - jobConfig_presubmit - - kaniko_buildpack - - jobConfig: - name: post-main-kyma-incubator-mothership-reconciler - image: "europe-docker.pkg.dev/kyma-project/prod/image-builder:v20240617-9b64b6ff" - annotations: - owner: jellyfish - description: build reconciler - labels: - preset-signify-prod-secret: "true" - args: - - "--name=incubator/reconciler/mothership" - - "--config=/config/kaniko-build-config.yaml" - - "--context=." - - "--dockerfile=Dockerfile.mr" - - "--tag=latest" - always_run: true - branches: - - ^main$ - inheritedConfigs: - global: - - jobConfig_postsubmit - - kaniko_buildpack - - jobConfig: - name: pre-main-kyma-incubator-component-reconciler - image: "europe-docker.pkg.dev/kyma-project/prod/image-builder:v20240617-9b64b6ff" - annotations: - owner: jellyfish - description: build component reconciler - args: - - "--name=incubator/reconciler/component" - - "--config=/config/kaniko-build-config.yaml" - - "--context=." - - "--dockerfile=Dockerfile.cr" - always_run: true - branches: - - ^main$ - inheritedConfigs: - global: - - jobConfig_presubmit - - kaniko_buildpack - - jobConfig: - name: post-main-kyma-incubator-component-reconciler - image: "europe-docker.pkg.dev/kyma-project/prod/image-builder:v20240617-9b64b6ff" - annotations: - owner: jellyfish - description: build component reconciler - labels: - preset-signify-prod-secret: "true" - args: - - "--name=incubator/reconciler/component" - - "--config=/config/kaniko-build-config.yaml" - - "--context=." - - "--dockerfile=Dockerfile.cr" - - "--tag=latest" - always_run: true - branches: - - ^main$ - inheritedConfigs: - global: - - jobConfig_postsubmit - - kaniko_buildpack - - jobConfig: - name: reconciler-control-plane-image-bump - annotations: - owner: jellyfish - description: Reconciler image bump in control-plane - decoration_config: - timeout: 14400000000000 # 4h - grace_period: 600000000000 # 10min - image: gcr.io/k8s-prow/generic-autobumper:v20240614-e4ae242d1 - command: generic-autobumper - args: - - --config=/home/prow/go/src/github.com/kyma-project/test-infra/configs/autobump-config/control-plane-autobump-reconciler-config.yaml - cron: "0 1-22/4 * * 1-5" # "At minute 0 past every 2nd hour from 1 through 22 on every day-of-week from Monday through Friday." - labels: - preset-log-collector-slack-token: "true" - preset-bot-github-token: "true" - inheritedConfigs: - global: - - jobConfig_default - - jobConfig_periodic - - extra_refs_reconciler - - extra_refs_test-infra - - extra_refs_control-plane - - jobConfig_slack_jellyfish - - jobConfig: - name: nightly-main-reconciler - image: europe-docker.pkg.dev/kyma-project/prod/testimages/e2e-garden:v20240617-cb2ed184 - annotations: - owner: jellyfish - description: Creates and installs reconciler from main every night. - cron: "0 0 * * 1-5" # "At 00:00 on every day-of-week from Monday through Friday" - inheritedConfigs: - global: - - jobConfig_default - - jobConfig_periodic - - gardener_gcp_job - - extra_refs_test-infra - - extra_refs_control-plane - - jobConfig_slack_jellyfish - local: - - reconciler_nightly_cluster_jobConfig - - reconciler_main_nightly_cluster_input_name - - jobConfig: - name: nightly-main-reconciler-e2e - annotations: - owner: jellyfish - description: Executes e2e test periodically on nightly cluster for reconciler. - image: europe-docker.pkg.dev/kyma-project/prod/testimages/e2e-dind-nodejs:v20240617-cb2ed184 - decoration_config: - timeout: 14400000000000 # 4h - grace_period: 600000000000 # 10min - cron: "0 5 * * 1-5" # At 05:00 AM, Monday through Friday - labels: - preset-log-collector-slack-token: "true" - preset-bot-github-token: "true" - preset-gardener-gcp-kyma-integration: "true" - preset-cluster-version: "true" - inheritedConfigs: - global: - - jobConfig_default - - jobConfig_periodic - - gardener_gcp_job - - extra_refs_test-infra - - extra_refs_kyma - - extra_refs_control-plane - - jobConfig_slack_jellyfish - - unprivileged - local: - - reconciler_nightly_e2e_jobConfig - - reconciler_main_nightly_cluster_input_name - - jobConfig: - name: "pre-main-reconciler-validate-dockerfiles" - annotations: - owner: neighbors - description: hadolint reconciler - # following regexp won't start build if only Markdown files were changed - run_if_changed: ".*Dockerfile$" - command: "/bin/bash" - args: - - "-c" - - "shopt -s globstar; hadolint --config .hadolint.yaml --no-color **/Dockerfile" - labels: - preset-kyma-guard-bot-github-token: "true" - image: europe-docker.pkg.dev/kyma-project/prod/testimages/alpine-hadolint:v20240617-cb2ed184 - inheritedConfigs: - global: - - jobConfig_default - - jobConfig_presubmit - - extra_refs_test-infra - local: - - reconciler_main_jobConfig