diff --git a/Makefile b/Makefile index da81db5b0..00ee3d11f 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION=v0.1.4 +VERSION=v0.1.5 OUT_DIR=dist YEAR?=$(shell date +"%Y") @@ -9,7 +9,6 @@ IMAGE_NAMESPACE?=codefresh RUNTIME_DEF_URL="https://raw.githubusercontent.com/codefresh-io/csdp-official/stable/csdp/hybrid/basic/runtime.yaml" ADD_CLUSTER_DEF_URL="https://github.com/codefresh-io/csdp-official/add-cluster/kustomize" -FALLBACK_ADD_CLUSTER_DEF_URL="https://github.com/codefresh-io/cli-v2/manifests/add-cluster/kustomize" # when developing, point this to your local clone of csdp-official DEV_RUNTIME_DEF_URL="https://raw.githubusercontent.com/codefresh-io/csdp-official/stable/csdp/hybrid/basic/runtime.yaml" @@ -106,7 +105,6 @@ $(OUT_DIR)/$(CLI_NAME)-%: $(CLI_SRCS) GIT_COMMIT=$(GIT_COMMIT) \ RUNTIME_DEF_URL=$(RUNTIME_DEF_URL) \ ADD_CLUSTER_DEF_URL=$(ADD_CLUSTER_DEF_URL) \ - FALLBACK_ADD_CLUSTER_DEF_URL=$(FALLBACK_ADD_CLUSTER_DEF_URL) \ SEGMENT_WRITE_KEY=$(SEGMENT_WRITE_KEY) \ DEV_MODE=$(DEV_MODE) \ OUT_FILE=$(OUT_DIR)/$(CLI_NAME)-$* \ diff --git a/build/add-cluster-script.yaml b/build/add-cluster-script.yaml deleted file mode 100644 index 32d85d36c..000000000 --- a/build/add-cluster-script.yaml +++ /dev/null @@ -1,94 +0,0 @@ -version: '1.0' -mode: parallel - -stages: - - Prepare - - Test - - Release - -steps: - main_clone: - stage: Prepare - title: clone repository - type: git-clone - git: cf_github - repo: ${{CF_REPO_OWNER}}/${{CF_REPO_NAME}} - revision: ${{CF_BRANCH}} - - prepare_env_vars: - stage: Prepare - title: prepare-env - image: codefresh/semver:latest - working_directory: manifests/add-cluster - commands: - - cf_export CHART_VERSION=$(yq ".version" helm/Chart.yaml | tr -d '"') - - cf_export IMAGE_VERSION=$(yq ".appVersion" helm/Chart.yaml | tr -d '"') - when: - steps: - - name: main_clone - on: - - success - - compare_versions: - stage: Test - title: Compare versions - image: codefresh/semver:latest - commands: - - hack/compare-versions.sh - when: - steps: - - name: prepare_env_vars - on: - - success - - build_image: - stage: Release - type: build - title: build and push add-cluster image - working_directory: manifests/add-cluster - image_name: codefresh/csdp-add-cluster - tag: ${{IMAGE_VERSION}} - tags: - - latest - - ${{IMAGE_VERSION}} - registry: ${{REGISTRY_INTEGRATION_QUAY}} - buildkit: true - when: - steps: - - name: compare_versions - on: - - success - branch: - only: ["main"] - - build_dev_image: - stage: Release - type: build - title: build and push add-cluster dev image - working_directory: manifests/add-cluster - image_name: codefresh/csdp-add-cluster - tag: ${{CF_BRANCH}} - registry: ${{REGISTRY_INTEGRATION_QUAY}} - buildkit: true - when: - steps: - - name: compare_versions - on: - - success - branch: - ignore: ["main"] - - publish_chart: - stage: Release - title: publish helm chart - image: quay.io/codefresh/golang-ci-helper:latest # change it - working_directory: manifests/add-cluster - environment: - - CHART_VERSION=${{CHART_VERSION}} - commands: - - echo "inside publish helm chart ${CHART_VERSION}" - when: - steps: - - name: build_image - on: - - success diff --git a/cmd/commands/cluster.go b/cmd/commands/cluster.go index 422827939..1b7a42c16 100644 --- a/cmd/commands/cluster.go +++ b/cmd/commands/cluster.go @@ -65,7 +65,7 @@ type ( ) var ( - minAddClusterSupportedVersion = semver.MustParse("0.0.283") + minAddClusterSupportedVersion = semver.MustParse("0.0.283") minAddClusterLabelsSupportedVersion = semver.MustParse("0.0.462") serviceAccountGVK = resid.Gvk{ @@ -384,7 +384,7 @@ func createAddClusterManifests(opts *ClusterAddOptions, ingressUrl, server, csdp return nil, "", fmt.Errorf("failed encoding annotations: %w", err) } - k.ConfigMapGenerator[0].KvPairSources.LiteralSources = append(k.ConfigMapGenerator[0].KvPairSources.LiteralSources, fmt.Sprintf("annotations=" + annotationsStr)) + k.ConfigMapGenerator[0].KvPairSources.LiteralSources = append(k.ConfigMapGenerator[0].KvPairSources.LiteralSources, fmt.Sprintf("annotations="+annotationsStr)) } if len(opts.labels) > 0 { @@ -393,7 +393,7 @@ func createAddClusterManifests(opts *ClusterAddOptions, ingressUrl, server, csdp return nil, "", fmt.Errorf("failed encoding labels: %w", err) } - k.ConfigMapGenerator[0].KvPairSources.LiteralSources = append(k.ConfigMapGenerator[0].KvPairSources.LiteralSources, fmt.Sprintf("labels=" + labelsStr)) + k.ConfigMapGenerator[0].KvPairSources.LiteralSources = append(k.ConfigMapGenerator[0].KvPairSources.LiteralSources, fmt.Sprintf("labels="+labelsStr)) } if opts.tag != "" { @@ -410,17 +410,7 @@ func createAddClusterManifests(opts *ClusterAddOptions, ingressUrl, server, csdp manifests, err := kustutil.BuildKustomization(k) if err != nil { - // go to fallback add-cluster manifests - // remove this once all manifests has been moved official-csdp repo. - // once we are sure no one will be looking for those manifests in cli-v2 we can remove this. - fallbackResourceUrl := fmt.Sprintf("%s?ref=v%s", store.FallbackAddClusterDefURL, version) - k.Resources[0] = fallbackResourceUrl - log.G().Warnf("Failed to get \"add-cluster\" manifests from %s, using fallback of %s", resourceUrl, fallbackResourceUrl) - - manifests, err = kustutil.BuildKustomization(k) - if err != nil { - return nil, "", fmt.Errorf("failed to build kustomization: %w", err) - } + return nil, "", fmt.Errorf("failed to build kustomization: %w", err) } return manifests, nameSuffix, nil diff --git a/docs/releases/release_notes.md b/docs/releases/release_notes.md index 65f8874f0..31a1fba9a 100644 --- a/docs/releases/release_notes.md +++ b/docs/releases/release_notes.md @@ -23,7 +23,7 @@ cf version ```bash # download and extract the binary -curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.4/cf-linux-amd64.tar.gz | tar zx +curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.5/cf-linux-amd64.tar.gz | tar zx # move the binary to your $PATH mv ./cf-linux-amd64 /usr/local/bin/cf @@ -36,7 +36,7 @@ cf version ```bash # download and extract the binary -curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.4/cf-darwin-amd64.tar.gz | tar zx +curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.5/cf-darwin-amd64.tar.gz | tar zx # move the binary to your $PATH mv ./cf-darwin-amd64 /usr/local/bin/cf diff --git a/hack/compare-versions.sh b/hack/compare-versions.sh deleted file mode 100755 index e4cb92c1a..000000000 --- a/hack/compare-versions.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash - -# used by the add-cluster-script.yaml -# compares the helm chart version with the kustomization image version to make sure they are identical - -BASE_DIRECTORY="manifests/add-cluster" -HELM_CHART="${BASE_DIRECTORY}/helm/Chart.yaml" -KUSTOMIZATION_YAML="${BASE_DIRECTORY}/kustomize/kustomization.yaml" - -HELM_VERSION=$(yq ".appVersion" ${HELM_CHART} | tr -d '"') -KUST_VERSION=$(yq '.images | select(.[].name == "quay.io/codefresh/csdp-add-cluster") | .[0].newTag' ${KUSTOMIZATION_YAML} | tr -d '"') -if ! semver-cli equal ${HELM_VERSION} ${KUST_VERSION}; then - echo "mismatched versions:" - echo "helm/Chart.yaml appVersion = ${HELM_VERSION}" - echo "kustomize/kustomization.yaml newTag = ${KUST_VERSION}" - exit 1 -fi - -echo "helm and kustomize versions match: ${HELM_VERSION}" diff --git a/manifests/add-cluster/kustomize/kustomization.yaml b/manifests/add-cluster/kustomize/kustomization.yaml deleted file mode 100644 index 883b76d1f..000000000 --- a/manifests/add-cluster/kustomize/kustomization.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - https://github.com/codefresh-io/csdp-official/add-cluster/kustomize -# This file is here for users with runtime version > 0.0.417 but with clis < 0.0.417 -# That will try to look for the add-cluster manifests in this location instead of -# csdp-official repo. We should remove this when we think clis < 0.0.417 are no longer -# in use. diff --git a/manifests/app-proxy/app-proxy.cm.yaml b/manifests/app-proxy/app-proxy.cm.yaml deleted file mode 100644 index a6115002d..000000000 --- a/manifests/app-proxy/app-proxy.cm.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: cap-app-proxy-cm -data: - argoCdUsername: admin - argoCdInsecure: "true" diff --git a/manifests/app-proxy/app-proxy.crb.yaml b/manifests/app-proxy/app-proxy.crb.yaml deleted file mode 100644 index 91d5d3578..000000000 --- a/manifests/app-proxy/app-proxy.crb.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: cap-app-proxy-binding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: argo-server-cluster-role -subjects: -- kind: ServiceAccount - name: cap-app-proxy - namespace: default diff --git a/manifests/app-proxy/app-proxy.deploy.yaml b/manifests/app-proxy/app-proxy.deploy.yaml deleted file mode 100644 index 1a0f75d32..000000000 --- a/manifests/app-proxy/app-proxy.deploy.yaml +++ /dev/null @@ -1,152 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: cap-app-proxy - name: cap-app-proxy -spec: - selector: - matchLabels: - app: cap-app-proxy - template: - metadata: - labels: - app: cap-app-proxy - spec: - serviceAccountName: cap-app-proxy - containers: - - env: - - name: ARGO_CD_URL - valueFrom: - configMapKeyRef: - name: cap-app-proxy-cm - key: argoCdUrl - optional: true - - name: ARGO_CD_USERNAME - valueFrom: - configMapKeyRef: - name: cap-app-proxy-cm - key: argoCdUsername - optional: true - - name: ARGO_CD_PASSWORD - valueFrom: - secretKeyRef: - name: argocd-initial-admin-secret - key: password - - name: ARGO_CD_INSECURE - valueFrom: - configMapKeyRef: - name: cap-app-proxy-cm - key: argoCdInsecure - - name: ARGO_WORKFLOWS_INSECURE - valueFrom: - configMapKeyRef: - name: cap-app-proxy-cm - key: argoWorkflowsInsecure - - name: ARGO_WORKFLOWS_URL - valueFrom: - configMapKeyRef: - name: cap-app-proxy-cm - key: argoWorkflowsUrl - optional: true - - name: CF_HOST - valueFrom: - configMapKeyRef: - name: cap-app-proxy-cm - key: cfHost - optional: true - - name: CORS - valueFrom: - configMapKeyRef: - name: cap-app-proxy-cm - key: cors - optional: true - - name: ENV - valueFrom: - configMapKeyRef: - name: cap-app-proxy-cm - key: env - optional: true - - name: GRAPHQL_DEBUG - valueFrom: - configMapKeyRef: - name: cap-app-proxy-cm - key: graphqlDebug - optional: true - - name: GRAPHQL_PLAYGROUND - valueFrom: - configMapKeyRef: - name: cap-app-proxy-cm - key: graphqlPlayground - optional: true - - name: NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: PORT - valueFrom: - configMapKeyRef: - name: cap-app-proxy-cm - key: port - optional: true - - name: REPOS_DIR - valueFrom: - configMapKeyRef: - name: cap-app-proxy-cm - key: reposDir - optional: true - - name: RUNTIME_NAME - valueFrom: - configMapKeyRef: - name: cap-app-proxy-cm - key: runtimeName - optional: true - - name: RUNTIME_TOKEN - valueFrom: - secretKeyRef: - name: codefresh-token - key: token - - name: RUNTIME_STORE_IV - valueFrom: - secretKeyRef: - name: codefresh-token - key: encryptionIV - optional: true - - name: STORE_BACKEND - valueFrom: - configMapKeyRef: - name: cap-app-proxy-cm - key: storeBackend - optional: true - - name: STRIP_PREFIX - valueFrom: - configMapKeyRef: - name: cap-app-proxy-cm - key: stripPrefix - optional: true - image: quay.io/codefresh/cap-app-proxy - imagePullPolicy: Always - name: cap-app-proxy - readinessProbe: - initialDelaySeconds: 10 - timeoutSeconds: 10 - httpGet: - port: http - path: /api/readyz - livenessProbe: - initialDelaySeconds: 10 - timeoutSeconds: 10 - failureThreshold: 10 - httpGet: - port: http - path: /api/healthz - ports: - - name: http - containerPort: 80 - resources: - requests: - memory: "256Mi" - cpu: "100m" - limits: - memory: "2048Mi" - cpu: "2" diff --git a/manifests/app-proxy/app-proxy.rb.yaml b/manifests/app-proxy/app-proxy.rb.yaml deleted file mode 100644 index 67412cfdf..000000000 --- a/manifests/app-proxy/app-proxy.rb.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - labels: - app: cap-app-proxy - name: cap-app-proxy -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: cap-app-proxy -subjects: - - kind: ServiceAccount - name: cap-app-proxy diff --git a/manifests/app-proxy/app-proxy.role.yaml b/manifests/app-proxy/app-proxy.role.yaml deleted file mode 100644 index 906254370..000000000 --- a/manifests/app-proxy/app-proxy.role.yaml +++ /dev/null @@ -1,37 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - labels: - app: cap-app-proxy - name: cap-app-proxy -rules: - - apiGroups: - - "" - resources: - - secrets - - configmap - - pods - verbs: - - get - - create - - delete - - deletecollection - - update - - patch - - list - - watch - - apiGroups: - - "" - resources: - - services - verbs: - - get - - list - - apiGroups: - - argoproj.io - resources: - - applications - verbs: - - get - - list - - watch \ No newline at end of file diff --git a/manifests/app-proxy/app-proxy.sa.yaml b/manifests/app-proxy/app-proxy.sa.yaml deleted file mode 100644 index 8592f5a1d..000000000 --- a/manifests/app-proxy/app-proxy.sa.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - app: cap-app-proxy - name: cap-app-proxy diff --git a/manifests/app-proxy/app-proxy.svc.yaml b/manifests/app-proxy/app-proxy.svc.yaml deleted file mode 100644 index 6e3ef0357..000000000 --- a/manifests/app-proxy/app-proxy.svc.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - app: cap-app-proxy - name: cap-app-proxy -spec: - selector: - app: cap-app-proxy - ports: - - name: http - port: 3017 - protocol: TCP - targetPort: http diff --git a/manifests/app-proxy/kustomization.yaml b/manifests/app-proxy/kustomization.yaml deleted file mode 100644 index 8a3179db8..000000000 --- a/manifests/app-proxy/kustomization.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -images: - - name: quay.io/codefresh/cap-app-proxy - newName: quay.io/codefresh/cap-app-proxy - newTag: 1.1960.1 -resources: - - app-proxy.deploy.yaml - - app-proxy.svc.yaml - - app-proxy.sa.yaml - - app-proxy.rb.yaml - - app-proxy.crb.yaml - - app-proxy.role.yaml - - app-proxy.cm.yaml diff --git a/manifests/argo-cd/default-rbac.yaml b/manifests/argo-cd/default-rbac.yaml deleted file mode 100644 index 4751047d0..000000000 --- a/manifests/argo-cd/default-rbac.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# allow default service account to read the codefresh-cm configmap -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: codefresh-config-reader -rules: - - apiGroups: [""] - resources: ["configmaps", "secrets"] - resourceNames: ["codefresh-cm", "codefresh-token"] - verbs: ["get"] - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: codefresh-config-reader -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: codefresh-config-reader -subjects: - - kind: ServiceAccount - name: default diff --git a/manifests/argo-cd/kustomization.yaml b/manifests/argo-cd/kustomization.yaml deleted file mode 100644 index 25fe563be..000000000 --- a/manifests/argo-cd/kustomization.yaml +++ /dev/null @@ -1,55 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - https://raw.githubusercontent.com/codefresh-io/argo-cd/release-2.3/manifests/install.yaml - - default-rbac.yaml -images: - - name: quay.io/codefresh/argocd - newName: quay.io/codefresh/argocd - newTag: v2.3.4-cap-CR-14428-dest-server-validation - -# will be effective on argo-cd 2.1 -configMapGenerator: - - name: argocd-cm - behavior: merge - literals: - - "timeout.reconciliation=20s" - - "accounts.admin=apiKey,login" # need to be able to generate apikey for generic eventsource - - name: argocd-cmd-params-cm - behavior: merge - literals: - - "server.insecure=true" - -patches: - # reset the crbs to `subject.namespace: default`, so that argo-cd will later change them to the actual ns - - target: - group: rbac.authorization.k8s.io - version: v1 - kind: ClusterRoleBinding - patch: |- - - op: replace - path: /subjects/0/namespace - value: default - - # Istio protocol selection: https://istio.io/latest/docs/ops/configuration/traffic-management/protocol-selection/ - # Ovveride the default protocol selection which is done by the port name (http), since this port is being used for both http and grpc. - - target: - version: v1 - kind: Service - name: argocd-server - patch: | - - op: add - path: /spec/ports/0/appProtocol - value: tcp - - - target: - version: v1 - group: apps - kind: Deployment - name: argocd-server - patch: | - - op: add - path: /spec/template/spec/containers/0/env/- - value: - name: ARGOCD_SYNC_WAVE_DELAY - value: "10" diff --git a/manifests/argo-events/codefresh-eventbus.eventbus.yaml b/manifests/argo-events/codefresh-eventbus.eventbus.yaml deleted file mode 100644 index 6cf9f3b55..000000000 --- a/manifests/argo-events/codefresh-eventbus.eventbus.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: argoproj.io/v1alpha1 -kind: EventBus -metadata: - name: codefresh-eventbus - annotations: - argocd.argoproj.io/sync-wave: "2" -spec: - nats: - native: - replicas: 3 - auth: token - maxPayload: "2MB" - containerTemplate: - resources: - limits: - cpu: 500m - memory: 8Gi - ephemeral-storage: 2Gi - requests: - cpu: 200m - memory: 500Mi - ephemeral-storage: 2Gi diff --git a/manifests/argo-events/codefresh-eventbus.pdb.yaml b/manifests/argo-events/codefresh-eventbus.pdb.yaml deleted file mode 100644 index af419b2bd..000000000 --- a/manifests/argo-events/codefresh-eventbus.pdb.yaml +++ /dev/null @@ -1,12 +0,0 @@ -# This api version is only acceptable since kubernetes 1.21 -# We need to think how we introduce this gradually to our customers - -apiVersion: policy/v1 -kind: PodDisruptionBudget -metadata: - name: codefresh-eventbus -spec: - minAvailable: 2 - selector: - matchLabels: - eventbus-name: codefresh-eventbus diff --git a/manifests/argo-events/kustomization.yaml b/manifests/argo-events/kustomization.yaml deleted file mode 100644 index 5a7c41180..000000000 --- a/manifests/argo-events/kustomization.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - https://raw.githubusercontent.com/codefresh-io/argo-events/v1.7.2-cap-CR-14600/manifests/install.yaml - - https://raw.githubusercontent.com/codefresh-io/argo-events/v1.7.2-cap-CR-14600/manifests/install-validating-webhook.yaml - - codefresh-eventbus.eventbus.yaml -# - codefresh-eventbus.pdb.yaml diff --git a/manifests/argo-rollouts/kustomization.yaml b/manifests/argo-rollouts/kustomization.yaml deleted file mode 100644 index 8feaaaaa4..000000000 --- a/manifests/argo-rollouts/kustomization.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - https://github.com/codefresh-io/argo-rollouts/releases/download/v1.2.0-cap-CR-10626/install.yaml -patches: - - target: - group: apiextensions.k8s.io - version: v1 - kind: CustomResourceDefinition - patch: |- - - op: remove - path: /spec/preserveUnknownFields - - # reset the crbs to `subject.namespace: default`, so that argo-rollouts will later change them to the actual ns - - target: - group: rbac.authorization.k8s.io - version: v1 - kind: ClusterRoleBinding - patch: |- - - op: replace - path: /subjects/0/namespace - value: default diff --git a/manifests/argo-workflows/kustomization.yaml b/manifests/argo-workflows/kustomization.yaml deleted file mode 100644 index 159cb32c9..000000000 --- a/manifests/argo-workflows/kustomization.yaml +++ /dev/null @@ -1,51 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - https://github.com/codefresh-io/argo-workflows/releases/download/v3.2.6-cap-CR-8697/install.yaml - -patches: - # reset the crbs to `subject.namespace: default`, so that argo-cd will later change them to the actual ns - - target: - group: rbac.authorization.k8s.io - version: v1 - kind: ClusterRoleBinding - patch: |- - - op: replace - path: /subjects/0/namespace - value: default - - - target: - group: apps - version: v1 - kind: Deployment - name: argo-server - patch: |- - - op: add - path: /spec/template/spec/containers/0/args/- - value: --auth-mode=server - -patchesStrategicMerge: - - | - apiVersion: v1 - kind: ConfigMap - metadata: - name: workflow-controller-configmap - data: - # Fields reference can be found here: https://argoproj.github.io/argo-workflows/workflow-controller-configmap.yaml - workflowDefaults: | - spec: - ttlStrategy: - secondsAfterCompletion: 86400 - secondsAfterSuccess: 86400 - secondsAfterFailure: 86400 - podGC: - strategy: OnWorkflowCompletion - labelSelector: - matchLabels: - should-be-deleted: "true" - -configMapGenerator: - - name: workflow-controller-configmap - behavior: merge - literals: - - containerRuntimeExecutor=emissary diff --git a/manifests/internal-router/internal-router.cm.yaml b/manifests/internal-router/internal-router.cm.yaml deleted file mode 100644 index e8547e9a7..000000000 --- a/manifests/internal-router/internal-router.cm.yaml +++ /dev/null @@ -1,45 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: internal-router-config -data: - default.conf.template: | - server { - listen 80 default_server; - root /usr/local/app; - access_log /dev/stdout main; - error_log /dev/stdout; - - - location /app-proxy { - # WebSocket support - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - chunked_transfer_encoding off; - - proxy_pass http://cap-app-proxy:3017; - } - - location /workflows/ { - # sse - proxy_set_header Connection ''; - proxy_http_version 1.1; - chunked_transfer_encoding off; - - proxy_pass https://argo-server:2746/; - } - - location ~ /webhooks/([^/]+)/([^/]+) { - resolver kube-dns.kube-system.svc.cluster.local valid=10s; - proxy_pass http://$2-eventsource-svc.$1.svc.cluster.local; - } - - location /readyz { - return 200 'ok'; - } - - location /healthz { - return 200 'ok'; - } - } \ No newline at end of file diff --git a/manifests/internal-router/internal-router.deploy.yaml b/manifests/internal-router/internal-router.deploy.yaml deleted file mode 100644 index f465e1d49..000000000 --- a/manifests/internal-router/internal-router.deploy.yaml +++ /dev/null @@ -1,50 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: internal-router -spec: - selector: - matchLabels: - app: internal-router - replicas: 1 - template: - metadata: - labels: - app: internal-router - spec: - containers: - - name: nginx - # do not upgrade to 1.23 until it's really critical - # 1.23 removed support for "Transfer-Encoding: identity" header value - # and it will break SSE from app-proxy - image: nginx:1.22-alpine - ports: - - containerPort: 80 - volumeMounts: - - mountPath: /etc/nginx/templates - readOnly: false - name: internal-router-config - - mountPath: /var/log/nginx - name: log - readinessProbe: - initialDelaySeconds: 10 - timeoutSeconds: 10 - httpGet: - port: 80 - path: /readyz - livenessProbe: - initialDelaySeconds: 10 - timeoutSeconds: 10 - failureThreshold: 10 - httpGet: - port: 80 - path: /healthz - volumes: - - name: internal-router-config - configMap: - name: internal-router-config - items: - - key: default.conf.template - path: default.conf.template - - name: log - emptyDir: { } \ No newline at end of file diff --git a/manifests/internal-router/internal-router.svc.yaml b/manifests/internal-router/internal-router.svc.yaml deleted file mode 100644 index 4d9cc1402..000000000 --- a/manifests/internal-router/internal-router.svc.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: internal-router - labels: - app: internal-router -spec: - ports: - - name: http - port: 80 - protocol: TCP - selector: - app: internal-router - type: ClusterIP \ No newline at end of file diff --git a/manifests/internal-router/kustomization.yaml b/manifests/internal-router/kustomization.yaml deleted file mode 100644 index c44671da8..000000000 --- a/manifests/internal-router/kustomization.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - internal-router.deploy.yaml - - internal-router.cm.yaml - - internal-router.svc.yaml diff --git a/manifests/runtime.yaml b/manifests/runtime.yaml index 798bf01c4..5a8e85665 100644 --- a/manifests/runtime.yaml +++ b/manifests/runtime.yaml @@ -1,3 +1,4 @@ +# This file should not be changed. The sole purpose of it staying here is backward compatibility apiVersion: codefresh.io/v1alpha1 kind: Runtime metadata: diff --git a/manifests/sealed-secrets/kustomization.yaml b/manifests/sealed-secrets/kustomization.yaml deleted file mode 100644 index 394cd6e46..000000000 --- a/manifests/sealed-secrets/kustomization.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - https://github.com/bitnami-labs/sealed-secrets/releases/download/v0.17.5/controller.yaml - -patches: - - target: - group: apps - version: v1 - kind: Deployment - name: sealed-secrets-controller - patch: |- - - op: add - path: /spec/template/spec/containers/0/args/- - value: --key-renew-period=720h - - op: replace - path: /spec/template/spec/containers/0/image - value: quay.io/codefresh/sealed-secrets-controller:v0.17.5 diff --git a/pkg/store/store.go b/pkg/store/store.go index 9e118101b..6850cd0fc 100644 --- a/pkg/store/store.go +++ b/pkg/store/store.go @@ -32,12 +32,11 @@ var ( gitCommit = "" SegmentWriteKey = "" // please do not touch this field it is deprecated, it's only here to allow to install runtimes with version < 0.0.569 - maxDefVersion = "2.1.2" - RuntimeDefURL = "https://raw.githubusercontent.com/codefresh-io/csdp-official/stable/csdp/hybrid/basic/runtime.yaml" - OldRuntimeDefURL = "https://github.com/codefresh-io/cli-v2/releases/latest/download/runtime.yaml" - AddClusterDefURL = "https://github.com/codefresh-io/csdp-official/add-cluster/kustomize" - FallbackAddClusterDefURL = "https://github.com/codefresh-io/cli-v2/manifests/add-cluster/kustomize" - lastRuntimeVersionInCLI = "v0.0.569" + maxDefVersion = "2.1.2" + RuntimeDefURL = "https://raw.githubusercontent.com/codefresh-io/csdp-official/stable/csdp/hybrid/basic/runtime.yaml" + OldRuntimeDefURL = "https://github.com/codefresh-io/cli-v2/releases/latest/download/runtime.yaml" + AddClusterDefURL = "https://github.com/codefresh-io/csdp-official/add-cluster/kustomize" + lastRuntimeVersionInCLI = "v0.0.569" ) type Version struct {