diff --git a/charts/gitops-runtime/Chart.yaml b/charts/gitops-runtime/Chart.yaml index 2e11fadf..2feee270 100644 --- a/charts/gitops-runtime/Chart.yaml +++ b/charts/gitops-runtime/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: 0.1.27 description: A Helm chart for Codefresh gitops runtime name: gitops-runtime -version: 0.2.1-alpha.8 +version: 0.2.1-alpha.9 home: https://github.com/codefresh-io/gitops-runtime-helm keywords: - codefresh diff --git a/charts/gitops-runtime/README.md b/charts/gitops-runtime/README.md index 03949301..b2de2eb8 100644 --- a/charts/gitops-runtime/README.md +++ b/charts/gitops-runtime/README.md @@ -1,6 +1,6 @@ # gitops-runtime -![Version: 0.2.1-alpha.8](https://img.shields.io/badge/Version-0.2.1--alpha.8-informational?style=flat-square) ![AppVersion: 0.1.27](https://img.shields.io/badge/AppVersion-0.1.27-informational?style=flat-square) +![Version: 0.2.1-alpha.9](https://img.shields.io/badge/Version-0.2.1--alpha.9-informational?style=flat-square) ![AppVersion: 0.1.27](https://img.shields.io/badge/AppVersion-0.1.27-informational?style=flat-square) A Helm chart for Codefresh gitops runtime @@ -52,13 +52,13 @@ A Helm chart for Codefresh gitops runtime | app-proxy.image-enrichment.serviceAccount.name | string | `"codefresh-image-enrichment-sa"` | Name of the service account to create or the name of the existing one to use | | app-proxy.image.pullPolicy | string | `"IfNotPresent"` | | | app-proxy.image.repository | string | `"quay.io/codefresh/cap-app-proxy"` | | -| app-proxy.image.tag | string | `"1.2193.0"` | | +| app-proxy.image.tag | string | `"1.2207.0"` | | | app-proxy.imagePullSecrets | list | `[]` | | | app-proxy.initContainer.command[0] | string | `"./init.sh"` | | | app-proxy.initContainer.env | object | `{}` | | | app-proxy.initContainer.image.pullPolicy | string | `"IfNotPresent"` | | | app-proxy.initContainer.image.repository | string | `"quay.io/codefresh/cap-app-proxy-init"` | | -| app-proxy.initContainer.image.tag | string | `"1.2193.0"` | | +| app-proxy.initContainer.image.tag | string | `"1.2207.0"` | | | app-proxy.initContainer.resources.limits.cpu | string | `"1"` | | | app-proxy.initContainer.resources.limits.memory | string | `"512Mi"` | | | app-proxy.initContainer.resources.requests.cpu | string | `"0.2"` | | @@ -123,13 +123,9 @@ A Helm chart for Codefresh gitops runtime | event-reporters.workflow.sensor.replicas | int | `1` | | | event-reporters.workflow.sensor.resources | object | `{}` | | | event-reporters.workflow.serviceAccount.create | bool | `true` | | -| global.codefresh | object | `{"accountId":"","apiEventsPath":"/2.0/api/events","gitIntegration":{"provider":{"apiUrl":"https://api.github.com","name":"GITHUB"}},"url":"https://g.codefresh.io","userToken":{"secretKeyRef":{},"token":""}}` | Codefresh platform and account-related settings | +| global.codefresh | object | `{"accountId":"","apiEventsPath":"/2.0/api/events","url":"https://g.codefresh.io","userToken":{"secretKeyRef":{},"token":""}}` | Codefresh platform and account-related settings | | global.codefresh.accountId | string | `""` | Codefresh Account ID. | | global.codefresh.apiEventsPath | string | `"/2.0/api/events"` | Events API endpoint URL suffix. | -| global.codefresh.gitIntegration | object | `{"provider":{"apiUrl":"https://api.github.com","name":"GITHUB"}}` | Git integration for this runtime. Requires the Git provider name and the provider's API URL. | -| global.codefresh.gitIntegration.provider | object | `{"apiUrl":"https://api.github.com","name":"GITHUB"}` | The Git provider to use. We currently support GitHub, GitLab, Bitbucket Server, and Bitbucket Cloud. | -| global.codefresh.gitIntegration.provider.apiUrl | string | `"https://api.github.com"` | Provider API URL. Example for GitHub, https://api.github.com. | -| global.codefresh.gitIntegration.provider.name | string | `"GITHUB"` | Name of the Git provider: BITBUCKET, BITBUCKET_SERVER, GITHUB, GITLAB | | global.codefresh.url | string | `"https://g.codefresh.io"` | URL of Codefresh platform. | | global.codefresh.userToken | object | `{"secretKeyRef":{},"token":""}` | User token. Used for runtime registration against the patform. One of token (for plain text value) or secretKeyRef must be provided. | | global.codefresh.userToken.secretKeyRef | object | `{}` | User token that references an existing secret containing the token. | diff --git a/charts/gitops-runtime/ci/default-values.yaml b/charts/gitops-runtime/ci/default-values.yaml index 6870c149..f4680048 100644 --- a/charts/gitops-runtime/ci/default-values.yaml +++ b/charts/gitops-runtime/ci/default-values.yaml @@ -6,10 +6,6 @@ global: name: mysecret key: myvalue optional: true - gitIntegration: - provider: - name: 'GITHUB' - apiUrl: 'https://api.github.com' runtime: name: default diff --git a/charts/gitops-runtime/ci/ingressless-values.yaml b/charts/gitops-runtime/ci/ingressless-values.yaml index 746fcc79..3c96a247 100644 --- a/charts/gitops-runtime/ci/ingressless-values.yaml +++ b/charts/gitops-runtime/ci/ingressless-values.yaml @@ -1,10 +1,6 @@ global: codefresh: accountId: 628a80b693a15c0f9c13ab75 # Codefresh Account id for ilia-codefresh for now, needs to be some test account - gitIntegration: - provider: - name: 'GITHUB' - apiUrl: 'https://api.github.com' userToken: secretKeyRef: name: mysecret diff --git a/charts/gitops-runtime/templates/_components/cap-app-proxy/environment-variables/_main-container.yaml b/charts/gitops-runtime/templates/_components/cap-app-proxy/environment-variables/_main-container.yaml index 524ac3a8..a950b1c6 100644 --- a/charts/gitops-runtime/templates/_components/cap-app-proxy/environment-variables/_main-container.yaml +++ b/charts/gitops-runtime/templates/_components/cap-app-proxy/environment-variables/_main-container.yaml @@ -40,6 +40,7 @@ CORS: name: cap-app-proxy-cm key: cors optional: true +DEPLOYMENT_NAME: {{ include "cap-app-proxy.fullname" . }} ENV: valueFrom: configMapKeyRef: @@ -62,6 +63,7 @@ NAMESPACE: valueFrom: fieldRef: fieldPath: metadata.namespace +PART_OF_VALUE: app-proxy PORT: valueFrom: configMapKeyRef: diff --git a/charts/gitops-runtime/templates/_helpers.tpl b/charts/gitops-runtime/templates/_helpers.tpl index eab19ee9..c8271981 100644 --- a/charts/gitops-runtime/templates/_helpers.tpl +++ b/charts/gitops-runtime/templates/_helpers.tpl @@ -223,30 +223,6 @@ Output comma separated list of installed runtime components {{- $comptList | toYaml }} {{- end }} -# ------------------------------------------------------------------------------------------------------------ -# Git integration ------------------------------------------------------------------------------------------------------------- -{{- define "codefresh-gitops-runtime.git-integration.provider"}} - {{- if .Values.global.codefresh.gitIntegration.provider.name }} - {{- $supportedProviders := list "GITHUB" "GITLAB" "BITBUCKET" "BITBUCKET_SERVER" }} - {{- if has .Values.global.codefresh.gitIntegration.provider.name $supportedProviders }} - {{- print .Values.global.codefresh.gitIntegration.provider.name }} - {{- else }} - {{ fail (printf "ERROR: Unsupported git provider %s. Currently supported: GITHUB,GITLAB,BITBUCKET,BITBUCKET_SERVER" .Values.global.codefresh.gitIntegration.provider.name)}} - {{- end }} - {{- else }} - {{ fail "Values.global.codefresh.gitIntegration.provider.name is required"}} - {{- end }} -{{- end }} - -{{- define "codefresh-gitops-runtime.git-integration.apiUrl"}} - {{- if .Values.global.codefresh.gitIntegration.provider.apiUrl }} - {{- print .Values.global.codefresh.gitIntegration.provider.apiUrl }} - {{- else }} - {{ fail "Values.global.codefresh.gitIntegration.provider.apiUrl is required"}} - {{- end }} -{{- end }} - # ------------------------------------------------------------------------------------------------------------ # runtime git credentials # ------------------------------------------------------------------------------------------------------------ diff --git a/charts/gitops-runtime/templates/app-proxy/_app-proxy-env.yaml b/charts/gitops-runtime/templates/app-proxy/_app-proxy-env.yaml index 8f917180..8318c633 100644 --- a/charts/gitops-runtime/templates/app-proxy/_app-proxy-env.yaml +++ b/charts/gitops-runtime/templates/app-proxy/_app-proxy-env.yaml @@ -7,10 +7,6 @@ app-proxy components are generated. HELM_RELEASE_NAME: {{ .Release.Name }} USER_TOKEN: {{- include "codefresh-gitops-runtime.installation-token-env-var-value" . | nindent 2 }} -GIT_INTEGRATION_PROVIDER: {{ include "codefresh-gitops-runtime.git-integration.provider" .}} - {{- if .Values.global.codefresh.gitIntegration.provider.apiUrl }} -GIT_INTEGRATION_APIURL: {{ include "codefresh-gitops-runtime.git-integration.apiUrl" . }} - {{- end }} {{- if or .Values.global.runtime.gitCredentials.password.value .Values.global.runtime.gitCredentials.password.secretKeyRef }} GIT_USERNAME: {{ .Values.global.runtime.gitCredentials.username }} GIT_PASSWORD: @@ -21,5 +17,4 @@ GIT_PASSWORD: {{- define "codefresh-gitops-runtime.app-proxy.init-container.calculated-env-vars"}} USER_TOKEN: {{- include "codefresh-gitops-runtime.installation-token-env-var-value" . | nindent 2 }} -GIT_INTEGRATION_PROVIDER: {{ include "codefresh-gitops-runtime.git-integration.provider" .}} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/gitops-runtime/tests/values/mandatory-values-ingress.yaml b/charts/gitops-runtime/tests/values/mandatory-values-ingress.yaml index 378fdd18..1370a4f5 100644 --- a/charts/gitops-runtime/tests/values/mandatory-values-ingress.yaml +++ b/charts/gitops-runtime/tests/values/mandatory-values-ingress.yaml @@ -1,9 +1,5 @@ global: codefresh: - gitIntegration: - provider: - name: 'GITHUB' - apiUrl: 'https://api.github.com' accountId: 628a80b693a15c0f9c13ab75 # Codefresh Account id for ilia-codefresh for now, needs to be some test account userToken: token: 'dummy' diff --git a/charts/gitops-runtime/tests/values/mandatory-values-no-token.yaml b/charts/gitops-runtime/tests/values/mandatory-values-no-token.yaml index 7c99eb4c..be29b41a 100644 --- a/charts/gitops-runtime/tests/values/mandatory-values-no-token.yaml +++ b/charts/gitops-runtime/tests/values/mandatory-values-no-token.yaml @@ -1,9 +1,5 @@ global: codefresh: - gitIntegration: - provider: - name: 'GITHUB' - apiUrl: 'https://api.github.com' accountId: 628a80b693a15c0f9c13ab75 # Codefresh Account id for ilia-codefresh for now, needs to be some test account runtime: diff --git a/charts/gitops-runtime/tests/values/mandatory-values.yaml b/charts/gitops-runtime/tests/values/mandatory-values.yaml index efec819e..1733874d 100644 --- a/charts/gitops-runtime/tests/values/mandatory-values.yaml +++ b/charts/gitops-runtime/tests/values/mandatory-values.yaml @@ -1,10 +1,6 @@ global: codefresh: accountId: 628a80b693a15c0f9c13ab75 # Codefresh Account id for ilia-codefresh for now, needs to be some test account - gitIntegration: - provider: - name: 'GITHUB' - apiUrl: 'https://api.github.com' userToken: token: 'dummy' @@ -15,4 +11,4 @@ global: enabled: false argo-rollouts: - enabled: true \ No newline at end of file + enabled: true diff --git a/charts/gitops-runtime/values.yaml b/charts/gitops-runtime/values.yaml index 092d3a77..03cc500b 100644 --- a/charts/gitops-runtime/values.yaml +++ b/charts/gitops-runtime/values.yaml @@ -7,14 +7,6 @@ global: apiEventsPath: "/2.0/api/events" # -- Codefresh Account ID. accountId: "" - # -- Git integration for this runtime. Requires the Git provider name and the provider's API URL. - gitIntegration: - # -- The Git provider to use. We currently support GitHub, GitLab, Bitbucket Server, and Bitbucket Cloud. - provider: - # -- Name of the Git provider: BITBUCKET, BITBUCKET_SERVER, GITHUB, GITLAB - name: GITHUB - # -- Provider API URL. Example for GitHub, https://api.github.com. - apiUrl: https://api.github.com # -- User token. Used for runtime registration against the patform. One of token (for plain text value) or secretKeyRef must be provided. userToken: # -- User token in plain text. The chart creates and manages the secret for this token. @@ -280,14 +272,14 @@ app-proxy: image: repository: quay.io/codefresh/cap-app-proxy # Overrides the image tag whose default is the chart appVersion. - tag: 1.2193.0 + tag: 1.2207.0 pullPolicy: IfNotPresent initContainer: image: repository: quay.io/codefresh/cap-app-proxy-init # Overrides the image tag whose default is the chart appVersion. - tag: 1.2193.0 + tag: 1.2207.0 pullPolicy: IfNotPresent command: - ./init.sh