From 14c4389bdaca201376fc993f8dfaf3b81459525c Mon Sep 17 00:00:00 2001 From: Traver Tischio Date: Tue, 22 Oct 2024 13:53:04 -0400 Subject: [PATCH] Clean up default values in values file --- .../horizon/templates/ingest-statefulset.yaml | 21 +++--- charts/horizon/templates/ingress.yaml | 8 +-- charts/horizon/templates/web-deployment.yaml | 14 ++-- charts/horizon/values.yaml | 65 +++++++++---------- 4 files changed, 49 insertions(+), 59 deletions(-) diff --git a/charts/horizon/templates/ingest-statefulset.yaml b/charts/horizon/templates/ingest-statefulset.yaml index 6c1fdb8..73d8821 100644 --- a/charts/horizon/templates/ingest-statefulset.yaml +++ b/charts/horizon/templates/ingest-statefulset.yaml @@ -23,32 +23,31 @@ spec: release: {{ .Release.Name }} horizon_network: {{ .Values.global.network }} {{- if .Values.ingest.labels }} - {{- range $key, $value := .Values.ingest.labels }} + {{- range $key, $value := .Values.ingest.labels }} {{ $key }}: {{ $value | quote }} - {{- end }} + {{- end }} {{- end }} {{- if .Values.ingest.annotations }} annotations: - {{- range $key, $value := .Values.ingest.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} + {{- range $key, $value := .Values.ingest.annotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} {{- end }} spec: {{- if .Values.ingest.serviceAccountName }} - serviceAccountName: {{ .Values.ingest.serviceAccountName | default "default" }} + serviceAccountName: {{ .Values.ingest.serviceAccountName }} {{- end }} {{- if .Values.global.imagePullSecrets }} - imagePullSecrets: -{{ toYaml .Values.global.imagePullSecrets | indent 8 }} + imagePullSecrets: {{ toYaml .Values.global.imagePullSecrets | nindent 8 }} {{- end }} containers: - name: horizon image: {{ include "common.horizonImage" . | quote }} {{- if .Values.ingest.cliArgs }} args: - {{- range $flag := .Values.ingest.cliArgs }} - - {{ $flag | quote }} - {{- end }} + {{- range $flag := .Values.ingest.cliArgs }} + - {{ $flag | quote }} + {{- end }} {{- end }} imagePullPolicy: {{ .Values.global.image.horizon.pullPolicy }} ports: diff --git a/charts/horizon/templates/ingress.yaml b/charts/horizon/templates/ingress.yaml index 8992435..f3281aa 100644 --- a/charts/horizon/templates/ingress.yaml +++ b/charts/horizon/templates/ingress.yaml @@ -7,10 +7,10 @@ metadata: namespace: {{ .Release.Namespace }} {{- if .Values.ingest.ingress.annotations }} annotations: - {{- range $key, $value := .Values.ingest.ingress.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- end }} + {{- range $key, $value := .Values.ingest.ingress.annotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} spec: tls: - secretName: {{ template "common.fullname" . }}-ingest-cert diff --git a/charts/horizon/templates/web-deployment.yaml b/charts/horizon/templates/web-deployment.yaml index b6dc6e2..4e8b9db 100644 --- a/charts/horizon/templates/web-deployment.yaml +++ b/charts/horizon/templates/web-deployment.yaml @@ -34,20 +34,18 @@ spec: {{- end }} spec: {{- if .Values.web.serviceAccountName }} - serviceAccountName: {{ .Values.web.serviceAccountName | default "default" }} + serviceAccountName: {{ .Values.web.serviceAccountName }} {{- end }} {{- if .Values.global.imagePullSecrets }} - imagePullSecrets: -{{ toYaml .Values.global.imagePullSecrets | indent 8 }} - {{- end }} - containers: + imagePullSecrets: {{ toYaml .Values.global.imagePullSecrets | nindent 8 }} + {{- end }} containers: - name: horizon image: {{ include "common.horizonImage" . | quote }} {{- if .Values.web.cliArgs }} args: - {{- range $flag := .Values.web.cliArgs }} - - {{ $flag | quote }} - {{- end }} + {{- range $flag := .Values.web.cliArgs }} + - {{ $flag | quote }} + {{- end }} {{- end }} imagePullPolicy: {{ .Values.global.image.horizon.pullPolicy }} ports: diff --git a/charts/horizon/values.yaml b/charts/horizon/values.yaml index 99bb080..cb600a0 100644 --- a/charts/horizon/values.yaml +++ b/charts/horizon/values.yaml @@ -7,20 +7,20 @@ global: ## - ingest.coreConfig network: testnet - ## Required when global.network is set to non-standard network - # historyArchiveUrls: "url1,url2,url3" - # networkPassphrase: "My Stellar Network; June 2020" + ## Only used when global.network is something other than "testnet" or "pubnet" + historyArchiveUrls: "url1,url2,url3" + + ## Only used when global.network is something other than "testnet" or "pubnet" + networkPassphrase: "My Stellar Network; June 2020" ## String to partially override common.fullname template (will maintain the release name) - ## - # nameOverride: + nameOverride: "" ## String to fully override common.fullname template - ## - # fullnameOverride: + fullnameOverride: "" ## List of pre-existing image Pull Secrets to use - # imagePullSecrets: + imagePullSecrets: [] # - imagepullsecret1 # - imagepullsecret2 @@ -65,31 +65,28 @@ ingest: ## pre existing secret that contains the DATABASE_URL key with postgres URL existingSecret: "" - ## Required when global.network is set to non-standard value - ## Also useful if you want to provide non-standard testnet or pubnet config - # coreConfig: + ## Only used when global.network is something other than "testnet" or "pubnet" + coreConfig: {} ## For production use cases we recommend at least 2 replicas replicaCount: 1 - ## Uncomment to use custom service account - # serviceAccountName: default + serviceAccountName: default ## Additional annotations or labels to add the Deployment template - # annotations: - # prometheus.io/scrape: "true" - # prometheus.io/port: "6000" - # labels: - # environment: "dev" - # mylabel1: "myvalue1" + annotations: {} + # prometheus.io/scrape: "true" + # prometheus.io/port: "6000" + labels: {} + # environment: "dev" + # mylabel1: "myvalue1" persistence: enabled: false storageClass: default size: 100G - ## Uncomment to set resource limits - #resources: + resources: {} # limits: # cpu: 2 # memory: 4Gi @@ -102,11 +99,11 @@ ingest: enabled: false host: horizon-ingest.example.com ## Extra annotations to add to the Ingress object - #annotations: + annotations: {} # kubernetes.io/ingress.class: "public" # cert-manager.io/cluster-issuer: "default" ## Extra labels to add to the Ingress object - #labels: + labels: {} # mylabel: myvalue coreExporter: @@ -120,8 +117,7 @@ ingest: ## See global.image.coreExporter for image settings - ## Uncomment to set resource limits - #resources: + resources: {} # limits: # cpu: 250m # memory: 512Mi @@ -137,11 +133,10 @@ web: enabled: false ## List of CLI arguments to provide to the stellar-horizon binary - # cliArgs: [] + cliArgs: [] ## This variable allows overrides of default settings - horizonConfig: - {} + horizonConfig: {} # port: 8001 ## pre existing secret that contains the DATABASE_URL key with postgres URL @@ -150,19 +145,17 @@ web: ## For production use cases we recommend at least 2 replicas replicaCount: 1 - ## Uncomment to use custom service account - # serviceAccountName: default + serviceAccountName: default ## Additional annotations or labels to add the Deployment template - # annotations: + annotations: {} # prometheus.io/scrape: "true" # prometheus.io/port: "6000" - # labels: + labels: {} # environment: "dev" # mylabel1: "myvalue1" - ## Uncomment to set resource limits - #resources: + resources: {} # limits: # cpu: 2 # memory: 4Gi @@ -175,9 +168,9 @@ web: enabled: false host: horizon-web.example.com ## Extra annotations to add to the Ingress object - #annotations: + annotations: {} # kubernetes.io/ingress.class: "public" # cert-manager.io/cluster-issuer: "default" ## Extra labels to add to the Ingress object - #labels: + labels: {} # mylabel: myvalue