Skip to content

Commit

Permalink
Prerelease/0.13.0 (#102)
Browse files Browse the repository at this point in the history
Get charts ready for next release

---------

Co-authored-by: pmariglia <[email protected]>
  • Loading branch information
stevepentland and pmariglia authored Mar 1, 2024
1 parent 3f0027f commit c6881e9
Show file tree
Hide file tree
Showing 29 changed files with 336 additions and 120 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/chart_lint_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ jobs:
if: steps.list-changed.outputs.changed == 'true'
uses: helm/[email protected]

- name: Copy template secret
if: steps.list-changed.outputs.changed == 'true'
run: |
cp testing-files/secret.yml charts/nx-cloud/templates/secret.yaml
cp testing-files/secret.yml charts/nx-agents/templates/secret.yaml
- name: Run chart-testing (install)
if: steps.list-changed.outputs.changed == 'true'
run: ct install --config testing-files/ct.yaml --target-branch ${{ github.event.repository.default_branch }}
2 changes: 1 addition & 1 deletion charts/nx-agents/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: nx-agents
description: Nx Cloud Agents Helm Chart
type: application
version: 1.0.0
version: 1.0.2-rc.5
maintainers:
- name: nx
url: "https://nx.app/"
Expand Down
12 changes: 12 additions & 0 deletions charts/nx-agents/ci/basic-moreenv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,15 @@ secret:
name: 'cloudsecret'
awsS3AccessKeyId: 'AWS_KEY'
awsS3SecretAccessKey: 'AWS_SECRET'

extraManifests:
secret:
apiVersion: v1
kind: Secret
metadata:
name: cloudsecret
namespace: nx-cloud-workflows
type: Opaque
stringData:
AWS_KEY: "MYAWSKEY"
AWS_SECRET: "SUPER_SECRET_AWS_SECRET"
12 changes: 12 additions & 0 deletions charts/nx-agents/ci/basic-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,15 @@ secret:
name: 'cloudsecret'
awsS3AccessKeyId: 'AWS_KEY'
awsS3SecretAccessKey: 'AWS_SECRET'

extraManifests:
secret:
apiVersion: v1
kind: Secret
metadata:
name: cloudsecret
namespace: nx-cloud-workflows
type: Opaque
stringData:
AWS_KEY: "MYAWSKEY"
AWS_SECRET: "SUPER_SECRET_AWS_SECRET"
4 changes: 4 additions & 0 deletions charts/nx-agents/templates/additional-manifests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{- range .Values.extraManifests }}
---
{{ tpl (toYaml .) $ }}
{{- end }}
7 changes: 7 additions & 0 deletions charts/nx-agents/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,10 @@ secret:
name: ''
awsS3AccessKeyId: ''
awsS3SecretAccessKey: ''


# If you would like to manage additional resources with this helm chart you can add additional manifests here.
# Basic structure is:
# name: <manifest>
# name will be ignored when rendering out the manifest. See the testing files for this chart for an example
extraManifests: {}
2 changes: 1 addition & 1 deletion charts/nx-cloud/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: nx-cloud
description: Nx Cloud Helm Chart
type: application
version: 0.13.0-rc.1
version: 0.13.0-rc.7
maintainers:
- name: nx
url: "https://nx.app/"
Expand Down
57 changes: 57 additions & 0 deletions charts/nx-cloud/ci/basic-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,82 @@ secret:
# When creating new values files for testing, bring over the lines below. The generated environment is quite resource
# constrained and with the default settings from values.yaml some of the pods will fail to schedule.
frontend:
deployment:
env:
- name: TEST_VARIABLE
value: 'test'
service:
annotations:
my.special-annotation: "annotated"
resources:
requests:
memory: '0.5Mi'
cpu: '0.1'

nxApi:
deployment:
env:
- name: TEST_VARIABLE
value: 'test'
service:
annotations:
my.special-annotation: "annotated"
resources:
requests:
memory: '0.5Mi'
cpu: '0.1'

fileServer:
deployment:
env:
- name: TEST_VARIABLE
value: 'test'
port: 5000
service:
port: 5000
annotations:
my.special-annotation: "annotated"
resources:
requests:
memory: '0.5Mi'
cpu: '0.1'

aggregator:
schedule: "*/10 * * * *"
env:
- name: TEST_VARIABLE
value: 'test'
resources:
requests:
memory: '0.5Mi'
cpu: '0.1'

messagequeue:
deployment:
port: 61616
service:
port: 61616

extraManifests:
secret:
apiVersion: v1
kind: Secret
metadata:
name: cloudsecret
type: Opaque
stringData:
NX_CLOUD_MONGO_SERVER_ENDPOINT: "mongodb://127.0.0.1"
ADMIN_PASSWORD: "SOME_ADMIN_PASSWORD"
GITHUB_SECRET: "I_AM_A_SECRET_VALUE"
GH_CLIENT_ID: "I_AM_A_SECRET_VALUE"
GH_CLIENT_SECRET_VALUE: "I_AM_A_SECRET_VALUE"
SOME_SECRET_TOKEN: "I_AM_A_SECRET_VALUE"
GITLAB_ACCESS_TOKEN: "I_AM_A_SECRET_VALUE"
GITHUB_AUTH_CLIENT_ID: "A_GITHUB_ID"
GITHUB_AUTH_CLIENT_SECRET: "A_GITHUB_CLIENT_SECRET"
GITHUB_WEBHOOK_SECRET: "A_GITHUB_SECRET_VALUE"
GITHUB_AUTH_TOKEN: "A_GITHUB_SECRET_VALUE"
GITHUB_APP_PRIVATE_KEY: "A_GITHUB_SECRET_VALUE"
GITHUB_APP_ID: "A_GITHUB_SECRET_VALUE"
AWS_KEY: "MYAWSKEY"
AWS_SECRET: "SUPER_SECRET_AWS_SECRET"
24 changes: 24 additions & 0 deletions charts/nx-cloud/ci/scm-gh-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,27 @@ aggregator:
requests:
memory: '0.5Mi'
cpu: '0.1'

extraManifests:
secret:
apiVersion: v1
kind: Secret
metadata:
name: cloudsecret
type: Opaque
stringData:
NX_CLOUD_MONGO_SERVER_ENDPOINT: "mongodb://127.0.0.1"
ADMIN_PASSWORD: "SOME_ADMIN_PASSWORD"
GITHUB_SECRET: "I_AM_A_SECRET_VALUE"
GH_CLIENT_ID: "I_AM_A_SECRET_VALUE"
GH_CLIENT_SECRET_VALUE: "I_AM_A_SECRET_VALUE"
SOME_SECRET_TOKEN: "I_AM_A_SECRET_VALUE"
GITLAB_ACCESS_TOKEN: "I_AM_A_SECRET_VALUE"
GITHUB_AUTH_CLIENT_ID: "A_GITHUB_ID"
GITHUB_AUTH_CLIENT_SECRET: "A_GITHUB_CLIENT_SECRET"
GITHUB_WEBHOOK_SECRET: "A_GITHUB_SECRET_VALUE"
GITHUB_AUTH_TOKEN: "A_GITHUB_SECRET_VALUE"
GITHUB_APP_PRIVATE_KEY: "A_GITHUB_SECRET_VALUE"
GITHUB_APP_ID: "A_GITHUB_SECRET_VALUE"
AWS_KEY: "MYAWSKEY"
AWS_SECRET: "SUPER_SECRET_AWS_SECRET"
24 changes: 24 additions & 0 deletions charts/nx-cloud/ci/scm-gl-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,27 @@ aggregator:
requests:
memory: '0.5Mi'
cpu: '0.1'

extraManifests:
secret:
apiVersion: v1
kind: Secret
metadata:
name: cloudsecret
type: Opaque
stringData:
NX_CLOUD_MONGO_SERVER_ENDPOINT: "mongodb://127.0.0.1"
ADMIN_PASSWORD: "SOME_ADMIN_PASSWORD"
GITHUB_SECRET: "I_AM_A_SECRET_VALUE"
GH_CLIENT_ID: "I_AM_A_SECRET_VALUE"
GH_CLIENT_SECRET_VALUE: "I_AM_A_SECRET_VALUE"
SOME_SECRET_TOKEN: "I_AM_A_SECRET_VALUE"
GITLAB_ACCESS_TOKEN: "I_AM_A_SECRET_VALUE"
GITHUB_AUTH_CLIENT_ID: "A_GITHUB_ID"
GITHUB_AUTH_CLIENT_SECRET: "A_GITHUB_CLIENT_SECRET"
GITHUB_WEBHOOK_SECRET: "A_GITHUB_SECRET_VALUE"
GITHUB_AUTH_TOKEN: "A_GITHUB_SECRET_VALUE"
GITHUB_APP_PRIVATE_KEY: "A_GITHUB_SECRET_VALUE"
GITHUB_APP_ID: "A_GITHUB_SECRET_VALUE"
AWS_KEY: "MYAWSKEY"
AWS_SECRET: "SUPER_SECRET_AWS_SECRET"
24 changes: 24 additions & 0 deletions charts/nx-cloud/ci/sh-like-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,27 @@ aggregator:
requests:
memory: '0.5Mi'
cpu: '0.1'

extraManifests:
secret:
apiVersion: v1
kind: Secret
metadata:
name: cloudsecret
type: Opaque
stringData:
NX_CLOUD_MONGO_SERVER_ENDPOINT: "mongodb://127.0.0.1"
ADMIN_PASSWORD: "SOME_ADMIN_PASSWORD"
GITHUB_SECRET: "I_AM_A_SECRET_VALUE"
GH_CLIENT_ID: "I_AM_A_SECRET_VALUE"
GH_CLIENT_SECRET_VALUE: "I_AM_A_SECRET_VALUE"
SOME_SECRET_TOKEN: "I_AM_A_SECRET_VALUE"
GITLAB_ACCESS_TOKEN: "I_AM_A_SECRET_VALUE"
GITHUB_AUTH_CLIENT_ID: "A_GITHUB_ID"
GITHUB_AUTH_CLIENT_SECRET: "A_GITHUB_CLIENT_SECRET"
GITHUB_WEBHOOK_SECRET: "A_GITHUB_SECRET_VALUE"
GITHUB_AUTH_TOKEN: "A_GITHUB_SECRET_VALUE"
GITHUB_APP_PRIVATE_KEY: "A_GITHUB_SECRET_VALUE"
GITHUB_APP_ID: "A_GITHUB_SECRET_VALUE"
AWS_KEY: "MYAWSKEY"
AWS_SECRET: "SUPER_SECRET_AWS_SECRET"
24 changes: 24 additions & 0 deletions charts/nx-cloud/ci/wfcontroller-values-nons.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,27 @@ nxCloudWorkflows:
enabled: true
name: 'nx-cloud-workflow-controller-service'
externalName: '192.168.1.2'

extraManifests:
secret:
apiVersion: v1
kind: Secret
metadata:
name: cloudsecret
type: Opaque
stringData:
NX_CLOUD_MONGO_SERVER_ENDPOINT: "mongodb://127.0.0.1"
ADMIN_PASSWORD: "SOME_ADMIN_PASSWORD"
GITHUB_SECRET: "I_AM_A_SECRET_VALUE"
GH_CLIENT_ID: "I_AM_A_SECRET_VALUE"
GH_CLIENT_SECRET_VALUE: "I_AM_A_SECRET_VALUE"
SOME_SECRET_TOKEN: "I_AM_A_SECRET_VALUE"
GITLAB_ACCESS_TOKEN: "I_AM_A_SECRET_VALUE"
GITHUB_AUTH_CLIENT_ID: "A_GITHUB_ID"
GITHUB_AUTH_CLIENT_SECRET: "A_GITHUB_CLIENT_SECRET"
GITHUB_WEBHOOK_SECRET: "A_GITHUB_SECRET_VALUE"
GITHUB_AUTH_TOKEN: "A_GITHUB_SECRET_VALUE"
GITHUB_APP_PRIVATE_KEY: "A_GITHUB_SECRET_VALUE"
GITHUB_APP_ID: "A_GITHUB_SECRET_VALUE"
AWS_KEY: "MYAWSKEY"
AWS_SECRET: "SUPER_SECRET_AWS_SECRET"
24 changes: 24 additions & 0 deletions charts/nx-cloud/ci/wfcontroller-values-wns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,27 @@ nxCloudWorkflows:
enabled: true
name: 'nx-cloud-workflow-controller-service'
externalName: ''

extraManifests:
secret:
apiVersion: v1
kind: Secret
metadata:
name: cloudsecret
type: Opaque
stringData:
NX_CLOUD_MONGO_SERVER_ENDPOINT: "mongodb://127.0.0.1"
ADMIN_PASSWORD: "SOME_ADMIN_PASSWORD"
GITHUB_SECRET: "I_AM_A_SECRET_VALUE"
GH_CLIENT_ID: "I_AM_A_SECRET_VALUE"
GH_CLIENT_SECRET_VALUE: "I_AM_A_SECRET_VALUE"
SOME_SECRET_TOKEN: "I_AM_A_SECRET_VALUE"
GITLAB_ACCESS_TOKEN: "I_AM_A_SECRET_VALUE"
GITHUB_AUTH_CLIENT_ID: "A_GITHUB_ID"
GITHUB_AUTH_CLIENT_SECRET: "A_GITHUB_CLIENT_SECRET"
GITHUB_WEBHOOK_SECRET: "A_GITHUB_SECRET_VALUE"
GITHUB_AUTH_TOKEN: "A_GITHUB_SECRET_VALUE"
GITHUB_APP_PRIVATE_KEY: "A_GITHUB_SECRET_VALUE"
GITHUB_APP_ID: "A_GITHUB_SECRET_VALUE"
AWS_KEY: "MYAWSKEY"
AWS_SECRET: "SUPER_SECRET_AWS_SECRET"
3 changes: 0 additions & 3 deletions charts/nx-cloud/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ Below are various little env snippets that multiple mainifests make use of
secretKeyRef:
name: {{ .Values.secret.name }}
key: {{ .Values.secret.nxCloudMongoServerEndpoint }}
{{- else }}
- name: SECRET_FILE_NX_CLOUD_MONGO_SERVER_ENDPOINT
value: {{ .Values.secret.nxCloudMongoServerEndpoint }}
{{- end }}
{{- end }}

Expand Down
25 changes: 2 additions & 23 deletions charts/nx-cloud/templates/_scm-helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,8 @@
secretKeyRef:
name: {{ .Values.secret.name }}
key: {{ .Values.secret.githubAuthToken }}
{{- else }}
- name: SECRET_FILE_GITHUB_WEBHOOK_SECRET
value: {{ .Values.secret.githubWebhookSecret }}
- name: SECRET_FILE_GITHUB_AUTH_TOKEN
value: {{ .Values.secret.githubAuthToken }}
{{- end }}
{{- if .Values.github.pr.defaultWorkspaceId }}
{{- end }}
{{- if .Values.github.pr.defaultWorkspaceId }}
- name: NX_CLOUD_INTEGRATION_DEFAULT_WORKSPACE_ID
value: {{ .Values.github.pr.defaultWorkspaceId }}
{{- end }}
Expand Down Expand Up @@ -68,9 +63,6 @@
name: {{ .Values.secret.name }}
key: {{ .Values.secret.gitlabAccessToken }}
{{- end }}
{{- else }}
- name: SECRET_FILE_NX_CLOUD_GITLAB_ACCESS_TOKEN
value: {{ .Values.secret.gitlabAccessToken }}
{{- end }}
{{- end }}
{{- end }}
Expand Down Expand Up @@ -107,18 +99,5 @@
name: {{ .Values.secret.name }}
key: {{ .Values.secret.githubPrivateKey }}
{{- end }}
{{- else }}
{{- if .Values.secret.githubAuthToken }}
- name: SECRET_FILE_NX_CLOUD_GITHUB_AUTH_TOKEN
value: {{ .Values.secret.githubAuthToken }}
{{- end }}
{{- if .Values.secret.githubAppId }}
- name: SECRET_FILE_NX_CLOUD_GITHUB_APP_ID
value: {{ .Values.secret.githubAppId }}
{{- end }}
{{- if .Values.secret.githubPrivateKey }}
- name: SECRET_FILE_NX_CLOUD_GITHUB_PRIVATE_KEY
value: {{ .Values.secret.githubPrivateKey }}
{{- end }}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/nx-cloud/templates/additional-manifests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{- range .Values.extraManifests }}
---
{{ tpl (toYaml .) $ }}
{{- end }}
8 changes: 4 additions & 4 deletions charts/nx-cloud/templates/nx-cloud-aggregator-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ spec:
{{- include "nxCloud.env.mode" . | indent 12 }}
{{- include "nxCloud.env.verboseMongoLogging" . | indent 12 }}
{{- include "nxCloud.env.seqValues" . | indent 12 }}
{{- if .Values.aggregator.env}}
{{- toYaml .Values.aggregator.env | nindent 12 }}
{{- end }}
{{- if .Values.clearRecordsOlderThanDays }}
- name: NX_CLOUD_DB_RUN_DATA_EXPIRATION_IN_DAYS
value: '{{ .Values.clearRecordsOlderThanDays }}'
Expand All @@ -42,9 +45,6 @@ spec:
secretKeyRef:
name: {{ .Values.secret.name }}
key: {{ .Values.secret.adminPassword }}
{{- else }}
- name: SECRET_FILE_ADMIN_PASSWORD
value: {{ .Values.secret.adminPassword }}
{{- end }}
{{- end }}
{{- if .Values.useCosmosDb }}
Expand All @@ -71,7 +71,7 @@ metadata:
labels:
{{- include "nxCloud.app.labels" . | indent 4 }}
spec:
schedule: '*/10 * * * *'
schedule: {{ .Values.aggregator.schedule | quote }}
concurrencyPolicy: Forbid
jobTemplate:
{{- include "nxCloud.aggregator.template" . | indent 4 }}
Loading

0 comments on commit c6881e9

Please sign in to comment.