diff --git a/README.md b/README.md index 2d715f2..c613915 100644 --- a/README.md +++ b/README.md @@ -99,10 +99,6 @@ Depending on the installation you perform, some tasks may be necessary or not. T | Key | Type | Default | Description | |-----|------|---------|-------------| | affinity | object | `{}` | | -| autoscaling.enabled | bool | `false` | | -| autoscaling.maxReplicas | int | `100` | | -| autoscaling.minReplicas | int | `1` | | -| autoscaling.targetCPUUtilizationPercentage | int | `80` | | | cert-manager-issuer.enabled | bool | `true` | | | cert-manager.enabled | bool | `true` | | | cert-manager.installCRDs | bool | `true` | | @@ -142,14 +138,13 @@ Depending on the installation you perform, some tasks may be necessary or not. T | dex.service.ports.http.port | int | `8000` | | | dex.service.type | string | `"NodePort"` | | | diracx.hostname | string | `""` | Required: The hostname where the webapp/API is running | -| diracx.manageOSIndices | bool | `true` | | | diracx.osDbs.dbs | string | `nil` | Which DiracX OpenSearch DBs are used? | | diracx.osDbs.default | string | `nil` | | | diracx.pythonModulesToInstall | list | `[]` | List of install specifications to pass to pip before launching each container | | diracx.service.port | int | `8000` | | | diracx.settings | object | "e.g. DIRACX_CONFIG_BACKEND_URL=..." | Settings to inject into the API container via environment variables | | diracx.settings.DIRACX_CONFIG_BACKEND_URL | string | `"git+file:///cs_store/initialRepo"` | This corresponds to the basic dirac.cfg which must be present on all the servers TODO: autogenerate all of these | -| diracx.sqlDbs.dbs | string | `nil` | | +| diracx.sqlDbs.dbs | string | `nil` | Which DiracX MySQL DBs are used? | | diracx.sqlDbs.default | string | `nil` | | | diracxWeb.service.port | int | `8080` | | | fullnameOverride | string | `""` | | diff --git a/diracx/templates/deployment.yaml b/diracx/templates/deployment.yaml index 72c7acd..bc0a195 100644 --- a/diracx/templates/deployment.yaml +++ b/diracx/templates/deployment.yaml @@ -5,9 +5,7 @@ metadata: labels: {{- include "diracx.labels" . | nindent 4 }} spec: - {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} - {{- end }} selector: matchLabels: {{- include "diracx.selectorLabels" . | nindent 6 }} diff --git a/diracx/templates/hpa.yaml b/diracx/templates/hpa.yaml deleted file mode 100644 index 6203607..0000000 --- a/diracx/templates/hpa.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "diracx.fullname" . }} - labels: - {{- include "diracx.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "diracx.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} -{{- end }} diff --git a/diracx/templates/init-os/job.yaml b/diracx/templates/init-os/job.yaml index 421ddc8..141ada5 100644 --- a/diracx/templates/init-os/job.yaml +++ b/diracx/templates/init-os/job.yaml @@ -55,9 +55,6 @@ spec: name: diracx-os-root-connection-urls key: DIRACX_OS_DB_{{ $dbName | upper }} {{- end }} - envFrom: - - secretRef: - name: diracx-init-os-secrets resources: {{- toYaml .Values.initOs.resources | nindent 12 }} volumes: diff --git a/diracx/templates/init-secrets/_init-secrets.sh.tpl b/diracx/templates/init-secrets/_init-secrets.sh.tpl index c7084d3..1307813 100644 --- a/diracx/templates/init-secrets/_init-secrets.sh.tpl +++ b/diracx/templates/init-secrets/_init-secrets.sh.tpl @@ -136,7 +136,8 @@ generate_secret_if_needed diracx-sql-root-connection-urls \ -# If we deploy MySQL ourselves +{{- if .Values.initOs.enabled }} +# If we deploy opensearch ourselves {{- if .Values.opensearch.enabled }} # Make sure that there are no default connection settings @@ -190,3 +191,4 @@ generate_secret_if_needed diracx-os-root-connection-urls \ {{- end }} {{- end }} +{{- end }} diff --git a/diracx/templates/init-sql/job.yaml b/diracx/templates/init-sql/job.yaml index a7be222..be915e7 100644 --- a/diracx/templates/init-sql/job.yaml +++ b/diracx/templates/init-sql/job.yaml @@ -55,9 +55,6 @@ spec: name: diracx-sql-root-connection-urls key: DIRACX_DB_URL_{{ $dbName | upper }} {{- end }} - envFrom: - - secretRef: - name: diracx-init-mysql-secrets resources: {{- toYaml $initSQLValues.resources | nindent 12 }} volumes: diff --git a/diracx/templates/secrets.yaml b/diracx/templates/secrets.yaml index 7b01b5a..1b69951 100644 --- a/diracx/templates/secrets.yaml +++ b/diracx/templates/secrets.yaml @@ -5,22 +5,3 @@ metadata: stringData: {{ .Values.diracx.settings | toYaml | indent 2 }} --- -{{- if index .Values "init-sql" "enabled" }} -apiVersion: v1 -kind: Secret -metadata: - name: diracx-init-mysql-secrets -stringData: -{{ (index .Values "init-sql" "env") | toYaml | indent 2 }} ---- -{{- end }} - -{{- if .Values.initOs.enabled }} -apiVersion: v1 -kind: Secret -metadata: - name: diracx-init-os-secrets -stringData: -{{ .Values.initOs.env | toYaml | indent 2 }} ---- -{{- end }} diff --git a/diracx/templates/web-deployment.yaml b/diracx/templates/web-deployment.yaml index e63ebe5..f0ac25d 100644 --- a/diracx/templates/web-deployment.yaml +++ b/diracx/templates/web-deployment.yaml @@ -7,9 +7,7 @@ metadata: labels: {{- include "diracx.labels" . | nindent 4 }} spec: - {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} - {{- end }} selector: matchLabels: {{- include "diracxWeb.selectorLabels" . | nindent 6 }} diff --git a/diracx/values.yaml b/diracx/values.yaml index 788f5da..90305de 100644 --- a/diracx/values.yaml +++ b/diracx/values.yaml @@ -59,7 +59,6 @@ securityContext: ################# -# TODO: should only be present during install init-cs: # Automatically initialize the repository in the CS volume enabled: true @@ -121,12 +120,8 @@ diracx: DIRACX_CONFIG_BACKEND_URL: "git+file:///cs_store/initialRepo" DIRACX_SERVICE_AUTH_TOKEN_KEY: "file:///signing-key/rsa256.key" DIRACX_SERVICE_AUTH_ALLOWED_REDIRECTS: '["http://anything:8000/docs/oauth2-redirect"]' - # Should DiracX include an init container which manages the OS DB indices? - # TODO: move to pre-upgrade hook - manageOSIndices: true - # TODO: # If mysql is enabled, you are not allowed # to set the username passwords sqlDbs: @@ -136,7 +131,7 @@ diracx: # user: dirac # password: password123 # host: sqlHost:123 - # # -- Which DiracX MySQL DBs are used? + # -- Which DiracX MySQL DBs are used? dbs: # AuthDB: # JobDB: @@ -148,8 +143,11 @@ diracx: # password: hush # host: proxyHost:345 + # If opensearch is enabled, you are not allowed + # to set the username passwords osDbs: default: + # -- Which DiracX OpenSearch DBs are used? dbs: # JobParametersDB: @@ -366,13 +364,6 @@ resources: # cpu: 100m # memory: 128Mi -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 100 - targetCPUUtilizationPercentage: 80 - # targetMemoryUtilizationPercentage: 80 - nodeSelector: {} tolerations: []