Skip to content

Commit

Permalink
Merge pull request #54 from nrwl/steve/chore/remove-cloud-values
Browse files Browse the repository at this point in the history
Remove values on-prem does not need
  • Loading branch information
stevepentland authored May 18, 2023
2 parents f8a0d24 + 432e914 commit 17186bb
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 216 deletions.
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.10.0
version: 0.10.1
maintainers:
- name: nx
url: "https://nx.app/"
Expand Down
37 changes: 4 additions & 33 deletions charts/nx-cloud/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -51,34 +51,12 @@ app.kubernetes.io/instance: {{ .Release.Name }}
Below are various little env snippets that multiple mainifests make use of
*/}}

{{- define "nxCloud.env.aggregatorBilling" }}
{{- if ((.Values.billing).overrides) }}
{{- if .Values.billing.overrides.disableCreateBillingRecords }}
- name: NX_CLOUD_AGGREGATOR_DISABLE_CREATE_BILLING_RECORDS
value: '{{ .Values.billing.overrides.disableCreateBillingRecords }}'
{{- end }}
{{- if .Values.billing.overrides.forceCreateBillingRecords }}
- name: NX_CLOUD_AGGREGATOR_FORCE_CREATE_BILLING_RECORDS
value: '{{ .Values.billing.overrides.forceCreateBillingRecords }}'
{{- end }}
{{- if .Values.billing.overrides.disableProcessBilling }}
- name: NX_CLOUD_AGGREGATOR_DISABLE_PROCESS_BILLING
value: '{{ .Values.billing.overrides.disableProcessBilling }}'
{{- end }}
{{- if .Values.billing.overrides.forceProcessBilling }}
- name: NX_CLOUD_AGGREGATOR_FORCE_PROCESS_BILLING
value: '{{ .Values.billing.overrides.forceProcessBilling }}'
{{- end }}
{{- if .Values.billing.overrides.disableWarnFreePlanOrgs }}
- name: NX_CLOUD_AGGREGATOR_DISABLE_WARN_FREE_PLAN_ORGS
value: '{{ .Values.billing.overrides.disableWarnFreePlanOrgs }}'
{{- end }}
{{- if .Values.billing.overrides.forceWarnFreePlanOrgs }}
- name: NX_CLOUD_AGGREGATOR_FORCE_WARN_FREE_PLAN_ORGS
value: '{{ .Values.billing.overrides.forceWarnFreePlanOrgs }}'
{{- define "nxCloud.env.mode" }}
{{- if .Values.mode }}
- name: NX_CLOUD_MODE
value: '{{ .Values.mode | quote }}'
{{- end }}
{{- end }}
{{- end}}

{{- define "nxCloud.env.mongoSecrets" }}
{{- if .Values.secret.name }}
Expand All @@ -93,13 +71,6 @@ Below are various little env snippets that multiple mainifests make use of
{{- end }}
{{- end }}

{{- define "nxCloud.env.mode" }}
{{- if .Values.mode }}
- name: NX_CLOUD_MODE
value: '{{ .Values.mode }}'
{{- end }}
{{- end }}

{{- define "nxCloud.env.nxCloudAppUrl" }}
- name: NX_CLOUD_APP_URL
value: {{ .Values.nxCloudAppURL }}
Expand Down
35 changes: 1 addition & 34 deletions charts/nx-cloud/templates/nx-cloud-aggregator-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ spec:
env:
{{- include "nxCloud.env.mongoSecrets" . | indent 16 }}
{{- include "nxCloud.env.verboseLogging" . | indent 16 }}
{{- include "nxCloud.env.verboseMongoLogging" . | indent 16 }}
{{- include "nxCloud.env.mode" . | indent 16 }}
{{- include "nxCloud.env.aggregatorBilling" . | indent 16 }}
{{- include "nxCloud.env.verboseMongoLogging" . | indent 16 }}
{{- if .Values.clearRecordsOlderThanDays }}
- name: NX_CLOUD_DB_RUN_DATA_EXPIRATION_IN_DAYS
value: '{{ .Values.clearRecordsOlderThanDays }}'
Expand All @@ -49,36 +48,4 @@ spec:
- name: NX_CLOUD_USE_MONGO42
value: 'false'
{{- end }}
{{- if eq .Values.mode "public"}}
- name: STRIPE_API_KEY
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: STRIPE_API_KEY
- name: STRIPE_FLAT_PRICE_ID
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: STRIPE_FLAT_PRICE_ID
- name: STRIPE_UNIT_PRICE_ID
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: STRIPE_UNIT_PRICE_ID
- name: ROLLBAR_ENV
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: ROLLBAR_ENV
- name: ROLLBAR_TOKEN
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: ROLLBAR_TOKEN
- name: MANDRILL_API_KEY
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: MANDRILL_API_KEY
{{- end }}
restartPolicy: OnFailure
64 changes: 0 additions & 64 deletions charts/nx-cloud/templates/nx-cloud-api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,70 +145,6 @@ spec:
- name: NX_CLOUD_USE_MONGO42
value: 'false'
{{- end }}
{{- if eq .Values.mode "public"}}
- name: K8S
value: 'true'
- name: NX_CLOUD_AUTH0_CLIENT_ID
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: NX_CLOUD_AUTH0_CLIENT_ID
- name: NX_CLOUD_AUTH0_DOMAIN
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: NX_CLOUD_AUTH0_DOMAIN
- name: NX_CLOUD_AUTH0_AUDIENCE
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: NX_CLOUD_AUTH0_AUDIENCE
- name: API_AUTH0_DOMAIN
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: API_AUTH0_DOMAIN
- name: API_AUTH0_AUDIENCE
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: NX_CLOUD_AUTH0_AUDIENCE
- name: AUTH0_CREDENTIALS_GRANT_CLIENT_ID
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: AUTH0_CREDENTIALS_GRANT_CLIENT_ID
- name: AUTH0_CREDENTIALS_GRANT_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: AUTH0_CREDENTIALS_GRANT_CLIENT_SECRET
- name: AUTH0_MANAGEMENT_API_AUDIENCE
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: AUTH0_MANAGEMENT_API_AUDIENCE
- name: MANDRILL_API_KEY
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: MANDRILL_API_KEY
- name: STRIPE_API_KEY
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: STRIPE_API_KEY
- name: ROLLBAR_ENV
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: ROLLBAR_ENV
- name: ROLLBAR_TOKEN
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: ROLLBAR_TOKEN
{{- end }}
{{- if .Values.selfSignedCertConfigMap }}
volumes:
- configMap:
Expand Down
42 changes: 0 additions & 42 deletions charts/nx-cloud/templates/nx-cloud-frontend-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,45 +34,3 @@ spec:
env:
{{- include "nxCloud.env.verboseLogging" . | indent 12 }}
{{- include "nxCloud.env.mode" . | indent 12 }}
{{- if eq .Values.mode "public"}}
- name: NX_CLOUD_AUTH0_CLIENT_ID
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: NX_CLOUD_AUTH0_CLIENT_ID
- name: NX_CLOUD_AUTH0_DOMAIN
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: NX_CLOUD_AUTH0_DOMAIN
- name: NX_CLOUD_AUTH0_AUDIENCE
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: NX_CLOUD_AUTH0_AUDIENCE
- name: STRIPE_PLAN_ID
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: STRIPE_PLAN_ID
- name: STRIPE_PUBLISHED_KEY
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: STRIPE_PUBLISHED_KEY
- name: ROLLBAR_ENV
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: ROLLBAR_ENV
- name: ROLLBAR_NX_CLOUD_TOKEN
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: ROLLBAR_TOKEN
- name: GOOGLE_ANALYTICS_LOGGED_IN_ID
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: GOOGLE_ANALYTICS_LOGGED_IN_ID
{{- end }}
9 changes: 0 additions & 9 deletions charts/nx-cloud/templates/nx-cloud-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,6 @@ spec:
port:
number: 5000
{{- end }}
{{- range .Values.ingress.nxApiExtraRoutes }}
- path: {{ . }}
pathType: Prefix
backend:
service:
name: nx-cloud-nx-api-service
port:
number: 4203
{{- end }}
- path: /nx-cloud
pathType: Prefix
backend:
Expand Down
34 changes: 1 addition & 33 deletions charts/nx-cloud/templates/nx-cloud-nx-api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ spec:
{{- end}}
env:
{{- include "nxCloud.env.nxCloudAppUrl" . | indent 12 }}
{{- include "nxCloud.env.mode" . | indent 12 }}
{{- include "nxCloud.api.scm.githubAppEnv" . | indent 12 }}
{{- include "nxCloud.api.scm.all" . | indent 12 }}
{{- include "nxCloud.env.verboseLogging" . | indent 12 }}
{{- include "nxCloud.env.verboseMongoLogging" . | indent 12 }}
{{- include "nxCloud.env.mode" . | indent 12 }}
{{- include "nxCloud.env.mongoSecrets" . | indent 12 }}
{{- if .Values.enableMessageQueue }}
- name: ACTIVEMQ_ADDRESS
Expand Down Expand Up @@ -143,38 +143,6 @@ spec:
- name: NX_CLOUD_USE_MONGO42
value: 'false'
{{- end }}
{{- if eq .Values.mode "public"}}
- name: GITHUB_APP_ID
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: GITHUB_APP_ID
- name: GITHUB_APP_PRIVATE_KEY
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: GITHUB_APP_PRIVATE_KEY
- name: GITHUB_BOT_USERID
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: GITHUB_BOT_USERID
- name: GITHUB_WEBHOOK_SECRET
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: GITHUB_WEBHOOK_SECRET
- name: ROLLBAR_ENV
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: ROLLBAR_ENV
- name: ROLLBAR_TOKEN
valueFrom:
secretKeyRef:
name: {{ .Values.secret.name }}
key: ROLLBAR_TOKEN
{{- end }}
{{- if .Values.selfSignedCertConfigMap }}
- name: NX_CLOUD_NX_API_STARTUP_DELAY_SECONDS
value: '90'
Expand Down
1 change: 1 addition & 0 deletions charts/nx-cloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ naming:
nameOverride: ''
fullNameOverride: ''

mode: private-enterprise

nxCloudAppURL: ''
verboseLogging: false
Expand Down

0 comments on commit 17186bb

Please sign in to comment.