diff --git a/stable/fdi-dotstatsuite-config/Chart.yaml b/stable/fdi-dotstatsuite-config/Chart.yaml new file mode 100644 index 00000000..146e66a8 --- /dev/null +++ b/stable/fdi-dotstatsuite-config/Chart.yaml @@ -0,0 +1,32 @@ +apiVersion: v2 +name: fdi-dotstatsuite-config +description: fdi-dotstatsuite-config + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.2.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +appVersion: 1.16.0 + +home: https://statcan.gc.ca +sources: +- https://gitlab.k8s.cloud.statcan.ca/analytics-platform/fdi-idf/metadata +- https://gitlab.com/sis-cc/.stat-suite/dotstatsuite-kube-rp/ +maintainers: +- name: Timothy Raizenne + email: tim.raizenne@statcan.gc.ca +engine: gotpl diff --git a/stable/fdi-dotstatsuite-config/templates/NOTES.txt b/stable/fdi-dotstatsuite-config/templates/NOTES.txt new file mode 100644 index 00000000..e69de29b diff --git a/stable/fdi-dotstatsuite-config/templates/_helpers.tpl b/stable/fdi-dotstatsuite-config/templates/_helpers.tpl new file mode 100644 index 00000000..871523e4 --- /dev/null +++ b/stable/fdi-dotstatsuite-config/templates/_helpers.tpl @@ -0,0 +1,76 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "dotstatsuite.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "dotstatsuite.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "dotstatsuite.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "dotstatsuite.labels" -}} +helm.sh/chart: {{ include "dotstatsuite.chart" . }} +{{ include "dotstatsuite.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "dotstatsuite.selectorLabels" -}} +app.kubernetes.io/name: {{ include "dotstatsuite.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + + +{{/* +Create the name of the service account to use +*/}} +{{- define "dotstatsuite.config.serviceAccountName" -}} +{{- if .Values.config.serviceAccount.create }} +{{- default (include "dotstatsuite.fullname" .) .Values.config.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.config.serviceAccount.name }} +{{- end }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "dotstatsuite.proxy.serviceAccountName" -}} +{{- if .Values.proxy.serviceAccount.create }} +{{- default (include "dotstatsuite.fullname" .) .Values.proxy.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.proxy.serviceAccount.name }} +{{- end }} +{{- end }} + diff --git a/stable/fdi-dotstatsuite-config/templates/cm/proxy.yaml b/stable/fdi-dotstatsuite-config/templates/cm/proxy.yaml new file mode 100644 index 00000000..0df9481d --- /dev/null +++ b/stable/fdi-dotstatsuite-config/templates/cm/proxy.yaml @@ -0,0 +1,16 @@ +{{- if .Values.proxy.enabled -}} +kind: ConfigMap +apiVersion: v1 +metadata: + name: {{ include "dotstatsuite.fullname" . }}-proxy-routes +data: + routes.json: | + [ + {"host": "keycloak.siscc.org", "target": "http://keycloak-http"}, + {"host": "sfs-demo.siscc.org", "target": "http://sfs" }, + {"host": "share-demo.siscc.org", "target": "http://share" }, + + {"host": "sdmx-dlm.dev.cloud.statcan.ca", "target": "http://fdi-dotstatsuite-dlm", "tenant": "default:dlm" }, + {"host": "sdmx-dexplorer.dev.cloud.statcan.ca", "target": "http://fdi-dotstatsuite-dexplorer", "tenant": "default:de"} + ] +{{- end -}} diff --git a/stable/fdi-dotstatsuite-config/templates/deploy/config.yaml b/stable/fdi-dotstatsuite-config/templates/deploy/config.yaml new file mode 100644 index 00000000..a1ac7dd5 --- /dev/null +++ b/stable/fdi-dotstatsuite-config/templates/deploy/config.yaml @@ -0,0 +1,68 @@ +{{- if .Values.config.enabled -}} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "dotstatsuite.fullname" . }}-config + labels: + {{- include "dotstatsuite.labels" . | nindent 4 }}-config +spec: +{{- if not .Values.config.autoscaling.enabled }} + replicas: {{ .Values.config.replicaCount }} +{{- end }} + selector: + matchLabels: + {{- include "dotstatsuite.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.config.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "dotstatsuite.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.config.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "dotstatsuite.config.serviceAccountName" . }}-config + securityContext: + {{- toYaml .Values.config.podSecurityContext | nindent 8 }} + containers: + - name: {{ include "dotstatsuite.fullname" . }}-config + securityContext: + {{- toYaml .Values.config.securityContext | nindent 12 }} + image: "{{ .Values.config.image.repository }}:{{ .Values.config.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.config.image.pullPolicy }} + env: + - name: BUCKET_PROVIDER + value: {{ .Values.managed.bucket.provider }} + - name: ACCOUNT_NAME + valueFrom: + secretKeyRef: + name: {{ .Values.fullnameOverride }}-account-name + key: accountname + - name: ACCOUNT_KEY + valueFrom: + secretKeyRef: + name: {{ .Values.fullnameOverride }}-account-key + key: accountkey + - name: CONTAINER_NAME + value: {{ .Values.managed.bucket.containername }} + - name: I18N_BUCKET + value: {{ .Values.managed.bucket.i18n }} + - name: ASSETS_BUCKET + value: {{ .Values.managed.bucket.assets }} + - name: CONFIGS_BUCKET + value: {{ .Values.managed.bucket.configs }} + - name: DATA_DIR + value: {{ .Values.managed.bucket.data_dir }} + ports: + - name: http + containerPort: 80 + protocol: TCP + readinessProbe: + httpGet: + path: /healthcheck + port: http +{{- end -}} diff --git a/stable/fdi-dotstatsuite-config/templates/deploy/proxy.yaml b/stable/fdi-dotstatsuite-config/templates/deploy/proxy.yaml new file mode 100644 index 00000000..00681b7e --- /dev/null +++ b/stable/fdi-dotstatsuite-config/templates/deploy/proxy.yaml @@ -0,0 +1,63 @@ +{{- if .Values.proxy.enabled -}} +{{- $fullName := include "dotstatsuite.fullname" . -}} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "dotstatsuite.fullname" . }}-proxy + labels: + {{- include "dotstatsuite.labels" . | nindent 4 }}-proxy +spec: +{{- if not .Values.proxy.autoscaling.enabled }} + replicas: {{ .Values.proxy.replicaCount }} +{{- end }} + selector: + matchLabels: + {{- include "dotstatsuite.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.proxy.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "dotstatsuite.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.proxy.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "dotstatsuite.proxy.serviceAccountName" . }}-proxy + securityContext: + {{- toYaml .Values.proxy.podSecurityContext | nindent 8 }} + containers: + - name: {{ include "dotstatsuite.fullname" . }}-proxy + securityContext: + {{- toYaml .Values.proxy.securityContext | nindent 12 }} + image: "{{ .Values.proxy.image.repository }}:{{ .Values.proxy.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.proxy.image.pullPolicy }} + volumeMounts: + - name: {{ include "dotstatsuite.fullname" . }}-proxy-routes + mountPath: /opt/data + env: + - name: LOGGING_DRIVER + value: "" + - name: LOGGING_PROJECT_ID + value: "" + - name: LOGGING_LOGNAME + value: "" + - name: CONFIG_URL + value: "http://{{ $fullName }}-config.daaas.svc.cluster.local" + - name: PORT + value: "80" + ports: + - name: readiness-port + containerPort: 80 + readinessProbe: + httpGet: + path: /_healthcheck_ + port: readiness-port + volumes: + - name: {{ include "dotstatsuite.fullname" . }}-proxy-routes + configMap: + name: {{ include "dotstatsuite.fullname" . }}-proxy-routes +{{- end -}} diff --git a/stable/fdi-dotstatsuite-config/templates/dr/destrule.yaml b/stable/fdi-dotstatsuite-config/templates/dr/destrule.yaml new file mode 100644 index 00000000..63c78561 --- /dev/null +++ b/stable/fdi-dotstatsuite-config/templates/dr/destrule.yaml @@ -0,0 +1,16 @@ +{{- if .Values.destinationRule.enabled }} +apiVersion: networking.istio.io/v1alpha3 +kind: DestinationRule +metadata: + name: {{ template "dotstatsuite.fullname" . }}-config + labels: + app: {{ template "dotstatsuite.name" . }} + chart: {{ template "dotstatsuite.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + host: "*.{{ .Release.Namespace }}.svc.{{ default "cluster.local" .Values.clusterDomain }}" + trafficPolicy: + tls: + mode: "{{ default "DISABLE" .Values.destinationRule.mode }}" +{{- end }} diff --git a/stable/fdi-dotstatsuite-config/templates/hpa/config.yaml b/stable/fdi-dotstatsuite-config/templates/hpa/config.yaml new file mode 100644 index 00000000..5f813abd --- /dev/null +++ b/stable/fdi-dotstatsuite-config/templates/hpa/config.yaml @@ -0,0 +1,30 @@ +{{- if .Values.config.enabled -}} +{{- if .Values.config.autoscaling.enabled }} +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "dotstatsuite.fullname" . }}-config + labels: + {{- include "dotstatsuite.labels" . | nindent 4 }}-config +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "dotstatsuite.fullname" . }}-config + minReplicas: {{ .Values.config.autoscaling.minReplicas }} + maxReplicas: {{ .Values.config.autoscaling.maxReplicas }} + metrics: + {{- if .Values.config.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + targetAverageUtilization: {{ .Values.config.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.config.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + targetAverageUtilization: {{ .Values.config.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} +{{- end }} diff --git a/stable/fdi-dotstatsuite-config/templates/ing/config.yaml b/stable/fdi-dotstatsuite-config/templates/ing/config.yaml new file mode 100644 index 00000000..690245bf --- /dev/null +++ b/stable/fdi-dotstatsuite-config/templates/ing/config.yaml @@ -0,0 +1,46 @@ +{{- if .Values.config.enabled -}} +{{- if .Values.config.ingress.enabled -}} +{{- $fullName := include "dotstatsuite.fullname" . -}} +{{- $svcPort := .Values.config.service.port -}} +{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1 +{{- else -}} +apiVersion: extensions/v1 +{{- end }} +kind: Ingress +metadata: + name: {{ $fullName }}-config + labels: + {{- include "dotstatsuite.labels" . | nindent 4 }}-config + {{- with .Values.config.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if .Values.config.ingress.tls }} + tls: + {{- range .Values.config.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.config.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ . }} + pathType: ImplementationSpecific + backend: + service: + name: {{ $fullName }}-config + port: + number: {{ $svcPort }} + {{- end }} + {{- end }} + {{- end }} +{{- end }} diff --git a/stable/fdi-dotstatsuite-config/templates/sa/config.yaml b/stable/fdi-dotstatsuite-config/templates/sa/config.yaml new file mode 100644 index 00000000..6339fe2c --- /dev/null +++ b/stable/fdi-dotstatsuite-config/templates/sa/config.yaml @@ -0,0 +1,14 @@ +{{- if .Values.config.enabled -}} +{{- if .Values.config.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "dotstatsuite.config.serviceAccountName" . }}-config + labels: + {{- include "dotstatsuite.labels" . | nindent 4 }}-config + {{- with .Values.config.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} +{{- end }} diff --git a/stable/fdi-dotstatsuite-config/templates/sa/proxy.yaml b/stable/fdi-dotstatsuite-config/templates/sa/proxy.yaml new file mode 100644 index 00000000..fbfad9d2 --- /dev/null +++ b/stable/fdi-dotstatsuite-config/templates/sa/proxy.yaml @@ -0,0 +1,14 @@ +{{- if .Values.proxy.enabled -}} +{{- if .Values.proxy.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "dotstatsuite.proxy.serviceAccountName" . }}-proxy + labels: + {{- include "dotstatsuite.labels" . | nindent 4 }}-proxy + {{- with .Values.proxy.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} +{{- end }} diff --git a/stable/fdi-dotstatsuite-config/templates/secret/account-key.yaml b/stable/fdi-dotstatsuite-config/templates/secret/account-key.yaml new file mode 100644 index 00000000..686137bf --- /dev/null +++ b/stable/fdi-dotstatsuite-config/templates/secret/account-key.yaml @@ -0,0 +1,7 @@ +kind: Secret +apiVersion: v1 +metadata: + name: {{ .Values.fullnameOverride }}-account-key +data: + accountkey: {{ .Values.managed.bucket.accountkey | b64enc }} +type: Opaque \ No newline at end of file diff --git a/stable/fdi-dotstatsuite-config/templates/secret/account-name.yaml b/stable/fdi-dotstatsuite-config/templates/secret/account-name.yaml new file mode 100644 index 00000000..1d128ea3 --- /dev/null +++ b/stable/fdi-dotstatsuite-config/templates/secret/account-name.yaml @@ -0,0 +1,7 @@ +kind: Secret +apiVersion: v1 +metadata: + name: {{ .Values.fullnameOverride }}-account-name +data: + accountname: {{ .Values.managed.bucket.accountname | b64enc }} +type: Opaque \ No newline at end of file diff --git a/stable/fdi-dotstatsuite-config/templates/svc/config.yaml b/stable/fdi-dotstatsuite-config/templates/svc/config.yaml new file mode 100644 index 00000000..fa0d2e78 --- /dev/null +++ b/stable/fdi-dotstatsuite-config/templates/svc/config.yaml @@ -0,0 +1,18 @@ +{{- if .Values.config.enabled -}} +apiVersion: v1 +kind: Service +metadata: + name: {{ include "dotstatsuite.fullname" . }}-config + labels: + {{- include "dotstatsuite.labels" . | nindent 4 }}-config +spec: + type: {{ .Values.config.service.type }} + ports: + - port: {{ .Values.config.service.port }} + targetPort: http + protocol: TCP + name: http-config + selector: + {{- include "dotstatsuite.selectorLabels" . | nindent 4 }} + +{{- end }} \ No newline at end of file diff --git a/stable/fdi-dotstatsuite-config/templates/svc/proxy.yaml b/stable/fdi-dotstatsuite-config/templates/svc/proxy.yaml new file mode 100644 index 00000000..80ab7629 --- /dev/null +++ b/stable/fdi-dotstatsuite-config/templates/svc/proxy.yaml @@ -0,0 +1,18 @@ +{{- if .Values.proxy.enabled -}} +apiVersion: v1 +kind: Service +metadata: + name: {{ include "dotstatsuite.fullname" . }}-proxy + labels: + {{- include "dotstatsuite.labels" . | nindent 4 }}-proxy +spec: + type: {{ .Values.proxy.service.type }} + ports: + - port: {{ .Values.proxy.service.port }} + targetPort: http + protocol: TCP + name: http-proxy + selector: + {{- include "dotstatsuite.selectorLabels" . | nindent 4 }} + +{{- end }} \ No newline at end of file diff --git a/stable/fdi-dotstatsuite-config/values.yaml b/stable/fdi-dotstatsuite-config/values.yaml new file mode 100644 index 00000000..e93ffdf9 --- /dev/null +++ b/stable/fdi-dotstatsuite-config/values.yaml @@ -0,0 +1,201 @@ +# Default values for sdmxfrontend. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +# Globals +nameOverride: "fdi-dotstatsuite" +fullnameOverride: "fdi-dotstatsuite" + +managed: + bucket: + accountname: "fdiexternaldev" + accountkey: "5eL9ByGZlseUjEdfO5gnHZVwgcA7VogGyHckS273qCVdvfULuP/4klOpTIdfW86FaUUr7/oliNt1cKKtD4HQEQ==" + containername: "sdmx-config" + provider: "azure" + i18n: "dev/i18n" + assets: "dev/assets" + configs: "dev/configs" + +# Config +# https://gitlab.k8s.cloud.statcan.ca/analytics-platform/discovery/dotstatsuite-docker-compose +config: + enabled: true + replicaCount: 1 + + ingress: + enabled: true + annotations: + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + kubernetes.io/ingress.class: istio + hosts: + - host: sdmx-config.dev.cloud.statcan.ca + paths: + - '/*' + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + + image: + #repository: siscc/dotstatsuite-proxy + repository: artifactory.cloud.statcan.ca/docker/analytics-platform/dotstatsuite-config + pullPolicy: Always + # Overrides the image tag whose default is the chart version. + tag: "statcan-spin" + + serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + + podAnnotations: {} + + podSecurityContext: {} + # fsGroup: 2000 + + securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + + service: + type: ClusterIP + port: 80 + + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod + ## + imagePullSecrets: + - name: artifactory-prod + + resources: + limits: + cpu: 100m + memory: 2g + requests: + cpu: 100m + memory: 1g + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + + autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + + nodeSelector: {} + + tolerations: [] + + affinity: {} + +# Proxy +# https://gitlab.k8s.cloud.statcan.ca/analytics-platform/discovery/dotstatsuite-docker-compose +proxy: + enabled: false + replicaCount: 1 + + ingress: + enabled: false + annotations: + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + kubernetes.io/ingress.class: istio + hosts: + - host: tim-sdmx-proxy.dev.cloud.statcan.ca + paths: + - '/*' + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + + image: + repository: siscc/dotstatsuite-kube-proxy + pullPolicy: Always + # Overrides the image tag whose default is the chart version. + tag: "v14.0.0" + + serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + + podAnnotations: {} + + podSecurityContext: {} + # fsGroup: 2000 + + securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + + service: + type: NodePort + port: 80 + + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod + ## + imagePullSecrets: + - name: registry-pull-secret + + resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + + autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + + nodeSelector: {} + + tolerations: [] + + affinity: {} + + +# Destination Rule +# https://gitlab.k8s.cloud.statcan.ca/analytics-platform/discovery/dotstatsuite-docker-compose +destinationRule: + enabled: true + mode: DISABLE diff --git a/stable/fdi-dotstatsuite/templates/deploy/transfer.yaml b/stable/fdi-dotstatsuite/templates/deploy/transfer.yaml index b298b759..6aaa7a58 100644 --- a/stable/fdi-dotstatsuite/templates/deploy/transfer.yaml +++ b/stable/fdi-dotstatsuite/templates/deploy/transfer.yaml @@ -208,10 +208,6 @@ spec: httpGet: path: /live port: http - readinessProbe: - httpGet: - path: /health - port: http resources: {{- toYaml .Values.transfer.resources | nindent 12 }} volumes: @@ -228,7 +224,8 @@ spec: {{- end }} {{- if .Values.transfer.init_database }} initContainers: - {{- if index .Values.nsiStable.enabled }} + {{- if index .Values.nsiStable.enabled }} + {{- if index .Values.nsiStable.init_database }} - name: dbup-{{ template "dotstatsuite.fullname" . }}-stable-data image: "{{ .Values.nsiStable.dbup.image.repository }}:{{ .Values.nsiStable.dbup.image.tag }}" imagePullPolicy: {{ .Values.nsiStable.dbup.image.pullPolicy }} @@ -253,9 +250,11 @@ spec: key: password command: ['bash', '-c'] args: - - dotnet DotStat.DbUp.dll upgrade --connectionString "Server={{ template "dotstatsuite.databaseHost" . }};Database=$(STABLE_DATA_DB);User=$(SA_USER);Password=$(SA_PASSWORD);" --dataDb --loginName $(STABLE_DATA_USER) --loginPwd $(PASSWORD) --force --alterPassword --ROloginName ${READ_ONLY_USER} --ROloginPwd ${READ_ONLY_PASSWORD} + - dotnet DotStat.DbUp.dll upgrade --connectionString "Server={{ template "dotstatsuite.databaseHost" . }};Database=$(STABLE_DATA_DB);User=$(SA_USER);Password=$(SA_PASSWORD);" --executionTimeout 1440 --dataDb --loginName $(STABLE_DATA_USER) --loginPwd $(PASSWORD) --force --alterPassword --ROloginName ${READ_ONLY_USER} --ROloginPwd ${READ_ONLY_PASSWORD} {{- end }} -{{- if index .Values.nsiReset.enabled }} +{{- end }} +{{- if index .Values.nsiReset.enabled }} +{{- if index .Values.nsiReset.init_database }} - name: dbup-{{ template "dotstatsuite.fullname" . }}-reset-data image: "{{ .Values.nsiReset.dbup.image.repository }}:{{ .Values.nsiReset.dbup.image.tag }}" imagePullPolicy: {{ .Values.nsiReset.dbup.image.pullPolicy }} @@ -280,9 +279,11 @@ spec: key: password command: ['bash', '-c'] args: - - dotnet DotStat.DbUp.dll upgrade --connectionString "Server={{ template "dotstatsuite.databaseHost" . }};Database=$(RESET_DATA_DB);User=$(SA_USER);Password=$(SA_PASSWORD);" --dataDb --loginName $(RESET_DATA_USER) --loginPwd $(PASSWORD) --force --dropDb --alterPassword --ROloginName ${READ_ONLY_USER} --ROloginPwd ${READ_ONLY_PASSWORD} + - dotnet DotStat.DbUp.dll upgrade --connectionString "Server={{ template "dotstatsuite.databaseHost" . }};Database=$(RESET_DATA_DB);User=$(SA_USER);Password=$(SA_PASSWORD);" --executionTimeout 1440 --dataDb --loginName $(RESET_DATA_USER) --loginPwd $(PASSWORD) --force --dropDb --alterPassword --ROloginName ${READ_ONLY_USER} --ROloginPwd ${READ_ONLY_PASSWORD} {{- end }} -{{- if index .Values.nsiDesign.enabled }} +{{- end }} +{{- if index .Values.nsiDesign.enabled }} +{{- if index .Values.nsiDesign.init_database }} - name: dbup-{{ template "dotstatsuite.fullname" . }}-design-data image: "{{ .Values.nsiDesign.dbup.image.repository }}:{{ .Values.nsiDesign.dbup.image.tag }}" imagePullPolicy: {{ .Values.nsiDesign.dbup.image.pullPolicy }} @@ -307,9 +308,11 @@ spec: key: password command: ['bash', '-c'] args: - - dotnet DotStat.DbUp.dll upgrade --connectionString "Server={{ template "dotstatsuite.databaseHost" . }};Database=$(DESIGN_DATA_DB);User=$(SA_USER);Password=$(SA_PASSWORD);" --dataDb --loginName $(DESIGN_DATA_USER) --loginPwd $(PASSWORD) --force --alterPassword --ROloginName ${READ_ONLY_USER} --ROloginPwd ${READ_ONLY_PASSWORD} + - dotnet DotStat.DbUp.dll upgrade --connectionString "Server={{ template "dotstatsuite.databaseHost" . }};Database=$(DESIGN_DATA_DB);User=$(SA_USER);Password=$(SA_PASSWORD);" --executionTimeout 1440 --dataDb --loginName $(DESIGN_DATA_USER) --loginPwd $(PASSWORD) --force --alterPassword --ROloginName ${READ_ONLY_USER} --ROloginPwd ${READ_ONLY_PASSWORD} {{- end }} -{{- if index .Values.nsiStaging.enabled }} +{{- end }} +{{- if index .Values.nsiStaging.enabled }} +{{- if index .Values.nsiStaging.init_database }} - name: dbup-{{ template "dotstatsuite.fullname" . }}-staging-data image: "{{ .Values.nsiStaging.dbup.image.repository }}:{{ .Values.nsiStaging.dbup.image.tag }}" imagePullPolicy: {{ .Values.nsiStaging.dbup.image.pullPolicy }} @@ -334,7 +337,8 @@ spec: key: password command: ['bash', '-c'] args: - - dotnet DotStat.DbUp.dll upgrade --connectionString "Server={{ template "dotstatsuite.databaseHost" . }};Database=$(STAGING_DATA_DB);User=$(SA_USER);Password=$(SA_PASSWORD);" --dataDb --loginName $(STAGING_DATA_USER) --loginPwd $(PASSWORD) --force --alterPassword --ROloginName ${READ_ONLY_USER} --ROloginPwd ${READ_ONLY_PASSWORD} + - dotnet DotStat.DbUp.dll upgrade --connectionString "Server={{ template "dotstatsuite.databaseHost" . }};Database=$(STAGING_DATA_DB);User=$(SA_USER);Password=$(SA_PASSWORD);" --executionTimeout 1440 --dataDb --loginName $(STAGING_DATA_USER) --loginPwd $(PASSWORD) --force --alterPassword --ROloginName ${READ_ONLY_USER} --ROloginPwd ${READ_ONLY_PASSWORD} + {{- end }} {{- end }} {{- end }} {{- with .Values.transfer.nodeSelector }} diff --git a/stable/fdi-dotstatsuite/templates/dr/destrule.yaml b/stable/fdi-dotstatsuite/templates/dr/destrule.yaml index 276663c8..c25d0be9 100644 --- a/stable/fdi-dotstatsuite/templates/dr/destrule.yaml +++ b/stable/fdi-dotstatsuite/templates/dr/destrule.yaml @@ -1,5 +1,5 @@ {{- if .Values.destinationRule.enabled }} -apiVersion: networking.istio.io/v1alpha3 +apiVersion: networking.istio.io/v1 kind: DestinationRule metadata: name: {{ template "dotstatsuite.fullname" . }} diff --git a/stable/fdi-dotstatsuite/templates/policy/mssql.yaml b/stable/fdi-dotstatsuite/templates/policy/mssql.yaml index 25eea8fa..f3457010 100644 --- a/stable/fdi-dotstatsuite/templates/policy/mssql.yaml +++ b/stable/fdi-dotstatsuite/templates/policy/mssql.yaml @@ -1,5 +1,5 @@ {{- if index .Values "mssql-linux" "enabled" -}} -apiVersion: security.istio.io/v1beta1 +apiVersion: security.istio.io/v1 kind: PeerAuthentication metadata: name: {{ template "dotstatsuite.fullname" . }}-mssql-linux diff --git a/stable/fdi-dotstatsuite/values.yaml b/stable/fdi-dotstatsuite/values.yaml index 9824ab04..6e2ba895 100644 --- a/stable/fdi-dotstatsuite/values.yaml +++ b/stable/fdi-dotstatsuite/values.yaml @@ -127,7 +127,13 @@ authz: imagePullSecrets: - name: registry-pull-secret - resources: {} + resources: + limits: + cpu: 100m + memory: 128Mi + requests: + cpu: 100m + memory: 128Mi # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little # resources, such as Minikube. If you do want to specify resources, uncomment the following @@ -224,7 +230,13 @@ nsiReset: imagePullSecrets: - name: registry-pull-secret - resources: {} + resources: + limits: + cpu: 200m + memory: 16Gi + requests: + cpu: 100m + memory: 8Gi # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little # resources, such as Minikube. If you do want to specify resources, uncomment the following @@ -322,7 +334,13 @@ nsiStable: imagePullSecrets: - name: registry-pull-secret - resources: {} + resources: + limits: + cpu: 200m + memory: 16Gi + requests: + cpu: 100m + memory: 8Gi # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little # resources, such as Minikube. If you do want to specify resources, uncomment the following @@ -417,7 +435,13 @@ nsiDesign: imagePullSecrets: - name: registry-pull-secret - resources: {} + resources: + limits: + cpu: 200m + memory: 16Gi + requests: + cpu: 100m + memory: 8Gi # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little # resources, such as Minikube. If you do want to specify resources, uncomment the following @@ -514,7 +538,13 @@ nsiStaging: imagePullSecrets: - name: registry-pull-secret - resources: {} + resources: + limits: + cpu: 200m + memory: 16Gi + requests: + cpu: 100m + memory: 8Gi # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little # resources, such as Minikube. If you do want to specify resources, uncomment the following @@ -617,7 +647,13 @@ transfer: imagePullSecrets: - name: registry-pull-secret - resources: {} + resources: + limits: + cpu: 200m + memory: 16Gi + requests: + cpu: 100m + memory: 8Gi # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little # resources, such as Minikube. If you do want to specify resources, uncomment the following diff --git a/stable/fdi-eck/templates/deploy/elastic.yaml b/stable/fdi-eck/templates/deploy/elastic.yaml index c6d4aa6b..26504fc6 100644 --- a/stable/fdi-eck/templates/deploy/elastic.yaml +++ b/stable/fdi-eck/templates/deploy/elastic.yaml @@ -34,16 +34,16 @@ spec: # value: "password" - name: ELASTIC_PASSWORD valueFrom: - secretKeyRef: + secretKeyRef: name: elastic-secret key: password optional: false # same as default; "mysecret" must exist resources: limits: - cpu: "4" - memory: 8Gi + cpu: 200m + memory: 16Gi requests: - cpu: "2" + cpu: 100m memory: 8Gi volumeClaimTemplates: - metadata: @@ -54,7 +54,4 @@ spec: - ReadWriteOnce resources: requests: - storage: 128Gi - - - + storage: 128Gi \ No newline at end of file