diff --git a/charts/nx-cloud/Chart.yaml b/charts/nx-cloud/Chart.yaml index 34a115d..ca50f2b 100644 --- a/charts/nx-cloud/Chart.yaml +++ b/charts/nx-cloud/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: nx-cloud description: Nx Cloud Helm Chart type: application -version: 0.15.12 +version: 0.15.13 maintainers: - name: nx url: "https://nx.app/" diff --git a/charts/nx-cloud/templates/NOTES.txt b/charts/nx-cloud/templates/NOTES.txt index 5b946dc..7e38ede 100644 --- a/charts/nx-cloud/templates/NOTES.txt +++ b/charts/nx-cloud/templates/NOTES.txt @@ -2,8 +2,8 @@ Thank you for installing {{ .Chart.Name }} The version you installed is {{ .Chart.Version }} -Please note that as of version 0.12.0, the compatibility with nx-cloud images has changed and -only image tag 2312.11.7 and later are supported. +BREAKING CHANGE: As of Helm chart version 0.15.13 we have stopped using helm based VCS Integration configs. If you have defined +any of the "github.pr" or "gitlab.mr" values in your config.yaml, please remove them and setup your VCS integration via your +workspace "Settings" page. -At the time of install, you used version {{ .Values.global.imageTag }}, if you experience -any issues, please ensure you are using a compatible version. +See https://nx.dev/ci/reference/release-notes for an expanded version of this note. \ No newline at end of file diff --git a/charts/nx-cloud/templates/_scm-helpers.tpl b/charts/nx-cloud/templates/_scm-helpers.tpl index 63f325d..421dae4 100644 --- a/charts/nx-cloud/templates/_scm-helpers.tpl +++ b/charts/nx-cloud/templates/_scm-helpers.tpl @@ -1,75 +1,4 @@ -{{- define "nxCloud.frontend.scm.github" }} -{{- if .Values.github.pr.enabled }} - {{- if eq .Values.github.pr.mode "webhook" }} -- name: NX_CLOUD_VCS_INTEGRATION_TYPE - value: 'GITHUB_WEBHOOK' - {{- if .Values.github.pr.apiUrl }} -- name: GITHUB_API_URL - value: {{ .Values.github.pr.apiUrl }} - {{- end }} - {{- if .Values.github.pr.remoteRepositoryName }} -- name: NX_CLOUD_REMOTE_REPOSITORY_NAME - value: {{ .Values.github.pr.remoteRepositoryName }} - {{- end }} - {{- if .Values.secret.name }} -- name: GITHUB_WEBHOOK_SECRET - valueFrom: - secretKeyRef: - name: {{ .Values.secret.name }} - key: {{ .Values.secret.githubWebhookSecret }} -- name: GITHUB_AUTH_TOKEN - valueFrom: - secretKeyRef: - name: {{ .Values.secret.name }} - key: {{ .Values.secret.githubAuthToken }} -{{- end }} -{{- if .Values.github.pr.defaultWorkspaceId }} -- name: NX_CLOUD_INTEGRATION_DEFAULT_WORKSPACE_ID - value: {{ .Values.github.pr.defaultWorkspaceId }} - {{- end }} - {{- end }} - {{- if eq .Values.github.pr.mode "eventless" }} -- name: NX_CLOUD_VCS_INTEGRATION_TYPE - value: 'GITHUB_EVENTLESS' - {{- if .Values.github.pr.apiUrl }} -- name: NX_CLOUD_GITHUB_API_URL - value: {{ .Values.github.pr.apiUrl }} - {{- end }} - {{- if .Values.github.pr.remoteRepositoryName }} -- name: NX_CLOUD_REMOTE_REPOSITORY_NAME - value: {{ .Values.github.pr.remoteRepositoryName }} - {{- end }} - {{- end }} -{{- end }} -{{- end }} - -{{- define "nxCloud.frontend.scm.gitlab" }} -{{- if .Values.gitlab.mr.enabled }} -- name: NX_CLOUD_VCS_INTEGRATION_TYPE - value: "GITLAB_EVENTLESS" - {{- if .Values.gitlab.projectId }} -- name: NX_CLOUD_GITLAB_PROJECT_ID - value: {{ .Values.gitlab.projectId }} - {{- end }} - {{- if .Values.gitlab.apiUrl }} -- name: NX_CLOUD_GITLAB_BASE_URL - value: {{ .Values.gitlab.apiUrl }} - {{- end }} - {{- if .Values.secret.name }} - {{- if .Values.secret.gitlabAccessToken }} -- name: NX_CLOUD_GITLAB_ACCESS_TOKEN - valueFrom: - secretKeyRef: - name: {{ .Values.secret.name }} - key: {{ .Values.secret.gitlabAccessToken }} - {{- end }} - {{- end }} -{{- end }} -{{- end }} - {{- define "nxCloud.frontend.scm.all" }} -{{- include "nxCloud.frontend.scm.github" . }} -{{- include "nxCloud.frontend.scm.gitlab" . }} {{- if .Values.vcsHttpsProxy }} - name: VERSION_CONTROL_HTTPS_PROXY value: {{ .Values.vcsHttpsProxy }} @@ -78,15 +7,13 @@ {{- define "nxCloud.frontend.scm.githubAppEnv" }} {{- if .Values.secret.name }} - {{- if .Values.secret.githubAuthToken }} -- name: NX_CLOUD_GITHUB_AUTH_TOKEN + {{- if .Values.secret.githubAppId }} +- name: NX_CLOUD_GITHUB_APP_ID valueFrom: secretKeyRef: name: {{ .Values.secret.name }} - key: {{ .Values.secret.githubAuthToken }} - {{- end }} - {{- if .Values.secret.githubAppId }} -- name: NX_CLOUD_GITHUB_APP_ID + key: {{ .Values.secret.githubAppId }} +- name: NX_CLOUD_GITHUB_APP_APP_ID valueFrom: secretKeyRef: name: {{ .Values.secret.name }} @@ -99,5 +26,26 @@ name: {{ .Values.secret.name }} key: {{ .Values.secret.githubPrivateKey }} {{- end }} + {{- if .Values.secret.githubWebhookSecret }} +- name: NX_CLOUD_GITHUB_WEBHOOK_SECRET + valueFrom: + secretKeyRef: + name: {{ .Values.secret.name }} + key: {{ .Values.secret.githubWebhookSecret }} + {{- end }} + {{- if .Values.secret.githubAppClientId }} +- name: NX_CLOUD_GITHUB_APP_CLIENT_ID + valueFrom: + secretKeyRef: + name: {{ .Values.secret.name }} + key: {{ .Values.secret.githubAppClientId }} + {{- end }} + {{- if .Values.secret.githubAppClientSecret }} +- name: NX_CLOUD_GITHUB_APP_CLIENT_SECRET + valueFrom: + secretKeyRef: + name: {{ .Values.secret.name }} + key: {{ .Values.secret.githubAppClientSecret }} + {{- end }} {{- end }} {{- end }} \ No newline at end of file diff --git a/charts/nx-cloud/templates/nx-cloud-frontend-deployment.yaml b/charts/nx-cloud/templates/nx-cloud-frontend-deployment.yaml index 7228683..e2c5888 100644 --- a/charts/nx-cloud/templates/nx-cloud-frontend-deployment.yaml +++ b/charts/nx-cloud/templates/nx-cloud-frontend-deployment.yaml @@ -64,6 +64,7 @@ spec: {{- include "nxCloud.frontend.auth" . | indent 12 }} {{- include "nxCloud.workflows.serviceTarget" . | indent 12 }} {{- include "nxCloud.frontend.nxApiTarget" . | indent 12 }} + {{- include "nxCloud.frontend.scm.githubAppEnv" . | indent 12 }} {{- if .Values.frontend.deployment.env }} {{- toYaml .Values.frontend.deployment.env | nindent 12 }} {{- end }} @@ -71,31 +72,6 @@ spec: - name: NODE_EXTRA_CA_CERTS value: /self-signed-certs/self-signed-cert.crt {{- end}} - {{- with .Values.secret }} - {{- if .name }} - {{- if .githubPrivateKey }} - - name: NX_CLOUD_GITHUB_PRIVATE_KEY - valueFrom: - secretKeyRef: - name: {{ .name }} - key: {{ .githubPrivateKey }} - {{- end }} - {{- if .githubAppId }} - - name: NX_CLOUD_GITHUB_APP_ID - valueFrom: - secretKeyRef: - name: {{ .name }} - key: {{ .githubAppId }} - {{- end }} - {{- if .hubspotApiKey }} - - name: HUBSPOT_API_KEY - valueFrom: - secretKeyRef: - name: {{ .name }} - key: {{ .hubspotApiKey }} - {{- end }} - {{- end }} - {{- end }} {{- if .Values.selfSignedCertConfigMap }} volumes: - configMap: diff --git a/charts/nx-cloud/values.yaml b/charts/nx-cloud/values.yaml index 5484c2a..77cfa0a 100644 --- a/charts/nx-cloud/values.yaml +++ b/charts/nx-cloud/values.yaml @@ -221,6 +221,7 @@ saml: # If you plan to deploy using your own self-signed certs, add them to a config map and provide the name here # We will mount the configmap to the pods and import the certs contained within at `self-signed-cert.crt` selfSignedCertConfigMap: '' +vcsHttpsProxy: '' secret: name: '' @@ -235,6 +236,8 @@ secret: githubAuthToken: '' githubAppId: '' githubPrivateKey: '' + githubAppClientId: '' + githubAppClientSecret: '' gitlabAccessToken: '' extraManifests: {}