-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added: fdi-dotstatsuite-config chart (#393)
* updated values.yaml * spaces * fixed indent * Added Authz log4net Config Map Added Transfer log4net Config Map * changes transferlog4net name in values.yaml * added database timeout variable added auto log 2db level and enable * modified varaible to camel casing added spaces before curly brackets added varaible for DB timeout and commands * added data explorer project and data lifecycle manager * added nsiReset and nsiStable log config * changed variable name for consistency * correcting some varaiables names * added a if statement to create the config maps dynamically * added side car annotation log level * added component log level * fdi logging version 0.2.16 * Parameterized the config maps, changed variable names for consistency * fixed enabled variable name * added reset, stable * removed warning annotations for side cart as it was causing an error. added initdatabase parameter for when we dont want to upgrade database * fixed variable reference for init_database * incremented version to 0.2.17 * added elastic.yaml, kibana.yaml, elastic_ingress.yaml, kibana_ingress.yaml removed password from values.yaml incremented chart to 0.3.0 * added variable filter * Added elasticSearch variables in configmap fluentd.yaml * patch: minor changes to de-dv and dlm charts, tested locally * fixed json to yaml error * - changed horizontal pod autoscaler to the correct version - added namespace varaible to fdi-eck charts * namespace removed, does not need to be specified in the helm chart since it's done at the project level. * Invremented charts: fdi-dotstatsuite-dlm 0.3.0 fdi-dotstatsuite-de-dv 0.3.0 * patch fdi-eck-0.3.1 and fdi-dotstatsuite 0.2.18 * change container names for NSI pods to include fullname * fdi-eck 0.4.0 * fixed log name * added new line EOF * filter update * updated the filter * patch: fix HPA bug and misplaced {{-end}} * Updated hpa to support production version v2beta1 * removed smpt pasword in dotstatsuite-de-dv * autoscaling versioning, dlm full name * incremented chart version 0.3.1 for dotstasuite-dlm * removed smpt password dlm * fix linting error * added fdi-dotstatsuite-config changes resource limit to ElasticSearch and dotstatsuite * removed trailling spaces --------- Co-authored-by: rohank07 <[email protected]>
- Loading branch information
Showing
21 changed files
with
691 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: [email protected] | ||
engine: gotpl |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 -}} |
68 changes: 68 additions & 0 deletions
68
stable/fdi-dotstatsuite-config/templates/deploy/config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 -}} |
63 changes: 63 additions & 0 deletions
63
stable/fdi-dotstatsuite-config/templates/deploy/proxy.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |
7 changes: 7 additions & 0 deletions
7
stable/fdi-dotstatsuite-config/templates/secret/account-key.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
kind: Secret | ||
apiVersion: v1 | ||
metadata: | ||
name: {{ .Values.fullnameOverride }}-account-key | ||
data: | ||
accountkey: {{ .Values.managed.bucket.accountkey | b64enc }} | ||
type: Opaque |
Oops, something went wrong.