Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NODE-6103 Rename chart components #510

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AIO_BASE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.3.0-rc0
6.0.0-rc0
2 changes: 1 addition & 1 deletion TAG
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.3.0-rc0
6.0.0-rc0
4 changes: 2 additions & 2 deletions charts/ingress-nginx/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: wallarm-ingress
version: 5.3.0-rc0
appVersion: 5.3.0-rc0
version: 6.0.0-rc0
appVersion: 6.0.0-rc0
home: https://github.com/wallarm/ingress
description: Ingress controller for Kubernetes using NGINX as a reverse proxy and load balancer with Wallarm module
icon: https://static.wallarm.com/wallarm-logo.svg
Expand Down
14 changes: 7 additions & 7 deletions charts/ingress-nginx/ci/daemonset-extra-envs-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ controller:
value: EXTRA_NGINXCTR_VAL
wallarm:
apiHost: api.wallarm.com
addnode:
init:
extraEnvs:
- name: EXTRA_ADDNODE_KEY
value: EXTRA_ADDNODE_VAL
cron:
wcli:
extraEnvs:
- name: EXTRA_CRON_KEY
value: EXTRA_CRON_VAL
- name: EXTRA_WCLI_KEY
value: EXTRA_WCLI_VAL
collectd:
extraEnvs:
- name: EXTRA_COLLECTD_KEY
Expand All @@ -26,11 +26,11 @@ controller:
extraEnvs:
- name: EXTRA_APIFW_KEY
value: EXTRA_APIFW_VAL
tarantool:
postanalytics:
kind: DaemonSet
extraEnvs:
- name: EXTRA_TARANTOOL_KEY
value: EXTRA_TARANTOOL_VAL
- name: EXTRA_WSTORE_KEY
value: EXTRA_WSTORE_VAL
wallarm-appstructure:
extraEnvs:
- name: EXTRA_APPSTRUCT_KEY
Expand Down
14 changes: 7 additions & 7 deletions charts/ingress-nginx/ci/deployment-extra-envs-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ controller:
value: EXTRA_NGINXCTR_VAL
wallarm:
apiHost: api.wallarm.com
addnode:
init:
extraEnvs:
- name: EXTRA_ADDNODE_KEY
value: EXTRA_ADDNODE_VAL
cron:
wcli:
extraEnvs:
- name: EXTRA_CRON_KEY
value: EXTRA_CRON_VAL
- name: EXTRA_WCLI_KEY
value: EXTRA_WCLI_VAL
collectd:
extraEnvs:
- name: EXTRA_COLLECTD_KEY
Expand All @@ -26,10 +26,10 @@ controller:
extraEnvs:
- name: EXTRA_APIFW_KEY
value: EXTRA_APIFW_VAL
tarantool:
postanalytics:
extraEnvs:
- name: EXTRA_TARANTOOL_KEY
value: EXTRA_TARANTOOL_VAL
- name: EXTRA_WSTORE_KEY
value: EXTRA_WSTORE_VAL
wallarm-appstructure:
extraEnvs:
- name: EXTRA_APPSTRUCT_KEY
Expand Down
40 changes: 20 additions & 20 deletions charts/ingress-nginx/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,10 @@ Create the name of the controller service account to use
{{- end -}}
{{- end -}}

{{- define "ingress-nginx.wallarmTarantoolPort" -}}3313{{- end -}}
{{- define "ingress-nginx.wallarmTarantoolName" -}}{{ .Values.controller.name }}-wallarm-tarantool{{- end -}}
{{- define "ingress-nginx.wallarmTarantoolCronConfig" -}}{{ template "ingress-nginx.wallarmTarantoolName" . }}-cron{{- end -}}
{{- define "ingress-nginx.wallarmControllerCronConfig" -}}{{ include "ingress-nginx.controller.fullname" . | lower }}-cron{{- end -}}
{{- define "ingress-nginx.wallarmPostanalyticsPort" -}}3313{{- end -}}
{{- define "ingress-nginx.wallarmPostanalyticsName" -}}{{ .Values.controller.name }}-wallarm-wstore{{- end -}}
{{- define "ingress-nginx.wallarmPostanalyticsWcliConfig" -}}{{ template "ingress-nginx.wallarmPostanalyticsName" . }}-wcli{{- end -}}
{{- define "ingress-nginx.wallarmControllerWcliConfig" -}}{{ include "ingress-nginx.controller.fullname" . | lower }}-wcli{{- end -}}
{{- define "ingress-nginx.wallarmSecret" -}}{{ .Values.controller.name }}-secret{{- end -}}

{{- define "wallarm.credentials" -}}
Expand All @@ -221,10 +221,10 @@ Create the name of the controller service account to use
value: {{ .Chart.Version | quote }}
{{- end -}}

{{- define "ingress-nginx.wallarmInitContainer.addNode" -}}
- name: addnode
{{- if .Values.controller.wallarm.addnode.image }}
{{- with .Values.controller.wallarm.addnode.image }}
{{- define "ingress-nginx.wallarmInitContainer.init" -}}
- name: init
{{- if .Values.controller.wallarm.init.image }}
{{- with .Values.controller.wallarm.init.image }}
image: "{{ .repository }}:{{ .tag }}"
{{- end }}
{{- else }}
Expand All @@ -246,8 +246,8 @@ Create the name of the controller service account to use
- name: WALLARM_LABELS
value: "group={{ .Values.controller.wallarm.nodeGroup }}"
{{- end }}
{{- if .Values.controller.wallarm.addnode.extraEnvs }}
{{- toYaml .Values.controller.wallarm.addnode.extraEnvs | nindent 2 }}
{{- if .Values.controller.wallarm.init.extraEnvs }}
{{- toYaml .Values.controller.wallarm.init.extraEnvs | nindent 2 }}
{{- end }}
volumeMounts:
- mountPath: {{ include "wallarm.path" . }}
Expand All @@ -262,13 +262,13 @@ Create the name of the controller service account to use
readOnly: true
securityContext: {{ include "ingress-nginx.controller.containerSecurityContext" . | nindent 4 }}
resources:
{{ toYaml .Values.controller.wallarm.addnode.resources | indent 4 }}
{{ toYaml .Values.controller.wallarm.init.resources | indent 4 }}
{{- end -}}

{{- define "ingress-nginx.wallarmCronContainer" -}}
- name: cron
{{- if .Values.controller.wallarm.cron.image }}
{{- with .Values.controller.wallarm.cron.image }}
{{- define "ingress-nginx.wallarmWcliContainer" -}}
- name: wcli
{{- if .Values.controller.wallarm.wcli.image }}
{{- with .Values.controller.wallarm.wcli.image }}
image: "{{ .repository }}:{{ .tag }}"
{{- end }}
{{- else }}
Expand All @@ -282,8 +282,8 @@ Create the name of the controller service account to use
valueFrom:
fieldRef:
fieldPath: metadata.name
{{- if .Values.controller.wallarm.cron.extraEnvs }}
{{- toYaml .Values.controller.wallarm.cron.extraEnvs | nindent 2 }}
{{- if .Values.controller.wallarm.wcli.extraEnvs }}
{{- toYaml .Values.controller.wallarm.wcli.extraEnvs | nindent 2 }}
{{- end }}
volumeMounts:
- mountPath: {{ include "wallarm.path" . }}
Expand All @@ -298,7 +298,7 @@ Create the name of the controller service account to use
readOnly: true
securityContext: {{ include "ingress-nginx.controller.containerSecurityContext" . | nindent 4 }}
resources:
{{ toYaml .Values.controller.wallarm.cron.resources | indent 4 }}
{{ toYaml .Values.controller.wallarm.wcli.resources | indent 4 }}
{{- end -}}

{{- define "ingress-nginx.wallarmTokenVolume" -}}
Expand Down Expand Up @@ -512,8 +512,8 @@ Extra modules.
Wcli arguments building
*/}}
{{- define "ingress-nginx.wcli-args" -}}
"-log-level", "{{ .Values.controller.wallarm.cron.logLevel }}",{{ " " }}
{{- with .Values.controller.wallarm.cron.commands -}}
"-log-level", "{{ .Values.controller.wallarm.wcli.logLevel }}",{{ " " }}
{{- with .Values.controller.wallarm.wcli.commands -}}
{{- range $name, $value := . -}}
"job:{{ $name }}", "-log-level", "{{ $value.logLevel }}",{{ " " }}
{{- end -}}
Expand Down
2 changes: 1 addition & 1 deletion charts/ingress-nginx/templates/controller-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ data:
allow-snippet-annotations: "{{ .Values.controller.allowSnippetAnnotations }}"
{{- if .Values.controller.wallarm.enabled }}
enable-wallarm: "{{ .Values.controller.wallarm.enabled }}"
wallarm-upstream-service: "{{ include "ingress-nginx.controller.fullname" . }}-wallarm-tarantool"
wallarm-upstream-service: "{{ include "ingress-nginx.controller.fullname" . }}-wallarm-wstore"
wallarm-metrics-port: "{{ .Values.controller.wallarm.metrics.port }}"
wallarm-apifw-enabled: "{{ .Values.controller.wallarm.apiFirewall.enabled }}"
wallarm-apifw-port: "{{ .Values.controller.wallarm.apiFirewall.config.mainPort }}"
Expand Down
6 changes: 3 additions & 3 deletions charts/ingress-nginx/templates/controller-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
annotations:
{{- if .Values.controller.wallarm.enabled }}
wallarm-enabled: "true"
checksum/cron: {{ .Values.controller.wallarm.cron | toJson | sha256sum }}
checksum/wcli: {{ .Values.controller.wallarm.wcli | toJson | sha256sum }}
{{- if not .Values.controller.wallarm.existingSecret.enabled }}
checksum/token: {{ .Values.controller.wallarm.token | sha256sum }}
{{- end }}
Expand Down Expand Up @@ -198,7 +198,7 @@ spec:
{{- toYaml .Values.controller.extraContainers | nindent 8 }}
{{- end }}
{{- if .Values.controller.wallarm.enabled }}
{{ include "ingress-nginx.wallarmCronContainer" . | nindent 8 }}
{{ include "ingress-nginx.wallarmWcliContainer" . | nindent 8 }}
{{ include "ingress-nginx.wallarmCollectdContainer" . | nindent 8 }}
{{- if .Values.controller.wallarm.apiFirewall.enabled }}
{{ include "ingress-nginx.wallarmapiFirewallContainer" . | nindent 8 }}
Expand All @@ -224,7 +224,7 @@ spec:
{{- end }}
{{- if .Values.controller.wallarm.enabled }}
{{ $_ := set .Values "register_mode" "filtering" }}
{{ include "ingress-nginx.wallarmInitContainer.addNode" . | nindent 8 }}
{{ include "ingress-nginx.wallarmInitContainer.init" . | nindent 8 }}
{{- end }}
{{- if .Values.controller.hostNetwork }}
hostNetwork: {{ .Values.controller.hostNetwork }}
Expand Down
6 changes: 3 additions & 3 deletions charts/ingress-nginx/templates/controller-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
annotations:
{{- if .Values.controller.wallarm.enabled }}
wallarm-enabled: "true"
checksum/cron: {{ .Values.controller.wallarm.cron | toJson | sha256sum }}
checksum/wcli: {{ .Values.controller.wallarm.wcli | toJson | sha256sum }}
{{- if not .Values.controller.wallarm.existingSecret.enabled }}
checksum/token: {{ .Values.controller.wallarm.token | sha256sum }}
{{- end }}
Expand Down Expand Up @@ -201,7 +201,7 @@ spec:
{{- toYaml .Values.controller.extraContainers | nindent 8 }}
{{- end }}
{{- if .Values.controller.wallarm.enabled }}
{{ include "ingress-nginx.wallarmCronContainer" . | nindent 8 }}
{{ include "ingress-nginx.wallarmWcliContainer" . | nindent 8 }}
{{ include "ingress-nginx.wallarmCollectdContainer" . | nindent 8 }}
{{- if .Values.controller.wallarm.apiFirewall.enabled }}
{{ include "ingress-nginx.wallarmapiFirewallContainer" . | nindent 8 }}
Expand All @@ -226,7 +226,7 @@ spec:
{{- end }}
{{- if .Values.controller.wallarm.enabled }}
{{ $_ := set .Values "register_mode" "filtering" }}
{{ include "ingress-nginx.wallarmInitContainer.addNode" . | nindent 8 }}
{{ include "ingress-nginx.wallarmInitContainer.init" . | nindent 8 }}
{{- end }}
{{- end }}
{{- if .Values.controller.hostNetwork }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,83 +1,86 @@
{{- if .Values.controller.wallarm.enabled }}
{{- if eq .Values.controller.wallarm.tarantool.kind "DaemonSet" }}
{{- if eq .Values.controller.wallarm.postanalytics.kind "DaemonSet" }}
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
{{- include "ingress-nginx.labels" . | nindent 4 }}
app.kubernetes.io/component: {{ template "ingress-nginx.wallarmTarantoolName" . }}
app.kubernetes.io/component: {{ template "ingress-nginx.wallarmPostanalyticsName" . }}
{{- with .Values.controller.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ include "ingress-nginx.controller.fullname" . }}-wallarm-tarantool
name: {{ include "ingress-nginx.controller.fullname" . }}-wallarm-wstore
namespace: {{ .Release.Namespace }}
{{- if .Values.controller.wallarm.tarantool.annotations }}
{{- if .Values.controller.wallarm.postanalytics.annotations }}
annotations:
{{ toYaml .Values.controller.wallarm.tarantool.annotations | nindent 4 }}
{{ toYaml .Values.controller.wallarm.postanalytics.annotations | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
{{- include "ingress-nginx.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: {{ template "ingress-nginx.wallarmTarantoolName" . }}
app.kubernetes.io/component: {{ template "ingress-nginx.wallarmPostanalyticsName" . }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
template:
metadata:
annotations:
checksum/cron: {{ .Values.controller.wallarm.cron | toJson | sha256sum }}
checksum/wcli: {{ .Values.controller.wallarm.wcli | toJson | sha256sum }}
{{- if not .Values.controller.wallarm.existingSecret.enabled }}
checksum/token: {{ .Values.controller.wallarm.token | sha256sum }}
{{- end }}
{{- with .Values.controller.wallarm.tarantool.podAnnotations }}
{{- with .Values.controller.wallarm.postanalytics.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "ingress-nginx.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: {{ template "ingress-nginx.wallarmTarantoolName" . }}
{{- with .Values.controller.wallarm.tarantool.podLabels }}
app.kubernetes.io/component: {{ template "ingress-nginx.wallarmPostanalyticsName" . }}
{{- with .Values.controller.wallarm.postanalytics.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- if .Values.imagePullSecrets }}
imagePullSecrets: {{ toYaml .Values.imagePullSecrets | nindent 8 }}
{{- end }}
terminationGracePeriodSeconds: {{ .Values.controller.wallarm.tarantool.terminationGracePeriodSeconds }}
terminationGracePeriodSeconds: {{ .Values.controller.wallarm.postanalytics.terminationGracePeriodSeconds }}
initContainers:
{{ $_ := set .Values "register_mode" "post_analytic" }}
{{ include "ingress-nginx.wallarmInitContainer.addNode" . | nindent 8 }}
{{ include "ingress-nginx.wallarmInitContainer.init" . | nindent 8 }}
containers:
{{ include "ingress-nginx.wallarmCronContainer" . | nindent 8 }}
- name: tarantool
{{- if .Values.controller.wallarm.tarantool.image }}
{{- with .Values.controller.wallarm.tarantool.image }}
{{ include "ingress-nginx.wallarmWcliContainer" . | nindent 8 }}
- name: wstore
{{- if .Values.controller.wallarm.postanalytics.image }}
{{- with .Values.controller.wallarm.postanalytics.image }}
image: "{{ .repository }}:{{ .tag }}"
{{- end }}
{{- else }}
image: "{{ .Values.controller.wallarm.helpers.image }}:{{ .Values.controller.wallarm.helpers.tag }}"
{{- end }}
imagePullPolicy: "{{ .Values.controller.image.pullPolicy }}"
args: ["tarantool"]
args: ["wstore"]
env:
- name: SLAB_ALLOC_ARENA
value: "{{ .Values.controller.wallarm.tarantool.arena }}"
{{- if (index .Values "controller" "wallarm" "tarantool" "extraEnvs") }}
{{- toYaml (index .Values "controller" "wallarm" "tarantool" "extraEnvs") | nindent 12 }}
value: "{{ .Values.controller.wallarm.postanalytics.arena }}"
{{- if (index .Values "controller" "wallarm" "postanalytics" "extraEnvs") }}
{{- toYaml (index .Values "controller" "wallarm" "postanalytics" "extraEnvs") | nindent 12 }}
{{- end }}
securityContext: {{ include "ingress-nginx.controller.containerSecurityContext" . | nindent 12 }}
volumeMounts:
- mountPath: /opt/wallarm/etc/wallarm
name: wallarm
livenessProbe:
tcpSocket:
port: {{ template "ingress-nginx.wallarmTarantoolPort" . }}
initialDelaySeconds: {{ .Values.controller.wallarm.tarantool.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.controller.wallarm.tarantool.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.controller.wallarm.tarantool.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.controller.wallarm.tarantool.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.controller.wallarm.tarantool.livenessProbe.failureThreshold }}
port: {{ template "ingress-nginx.wallarmPostanalyticsPort" . }}
initialDelaySeconds: {{ .Values.controller.wallarm.postanalytics.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.controller.wallarm.postanalytics.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.controller.wallarm.postanalytics.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.controller.wallarm.postanalytics.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.controller.wallarm.postanalytics.livenessProbe.failureThreshold }}
ports:
- name: tarantool
containerPort: {{ template "ingress-nginx.wallarmTarantoolPort" . }}
- name: wstore
containerPort: {{ template "ingress-nginx.wallarmPostanalyticsPort" . }}
protocol: TCP
{{- if .Values.controller.wallarm.tarantool.resources }}
resources: {{ toYaml .Values.controller.wallarm.tarantool.resources | nindent 12 }}
{{- if .Values.controller.wallarm.postanalytics.resources }}
resources: {{ toYaml .Values.controller.wallarm.postanalytics.resources | nindent 12 }}
{{- end }}
- name: wallarm-appstructure
{{- if (index .Values "controller" "wallarm" "wallarm-appstructure" "image") }}
Expand All @@ -100,17 +103,17 @@ spec:
{{- if index .Values "controller" "wallarm" "wallarm-appstructure" "resources" }}
resources: {{ toYaml (index .Values "controller" "wallarm" "wallarm-appstructure" "resources") | nindent 12 }}
{{- end }}
{{- if .Values.controller.wallarm.tarantool.nodeSelector }}
nodeSelector: {{ toYaml .Values.controller.wallarm.tarantool.nodeSelector | nindent 8 }}
{{- if .Values.controller.wallarm.postanalytics.nodeSelector }}
nodeSelector: {{ toYaml .Values.controller.wallarm.postanalytics.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.controller.wallarm.tarantool.tolerations }}
tolerations: {{ toYaml .Values.controller.wallarm.tarantool.tolerations | nindent 8 }}
{{- if .Values.controller.wallarm.postanalytics.tolerations }}
tolerations: {{ toYaml .Values.controller.wallarm.postanalytics.tolerations | nindent 8 }}
{{- end }}
{{- if .Values.controller.wallarm.tarantool.affinity }}
affinity: {{ toYaml .Values.controller.wallarm.tarantool.affinity | nindent 8 }}
{{- if .Values.controller.wallarm.postanalytics.affinity }}
affinity: {{ toYaml .Values.controller.wallarm.postanalytics.affinity | nindent 8 }}
{{- end }}
{{- if .Values.controller.wallarm.tarantool.topologySpreadConstraints }}
topologySpreadConstraints: {{ toYaml .Values.controller.wallarm.tarantool.topologySpreadConstraints | nindent 8 }}
{{- if .Values.controller.wallarm.postanalytics.topologySpreadConstraints }}
topologySpreadConstraints: {{ toYaml .Values.controller.wallarm.postanalytics.topologySpreadConstraints | nindent 8 }}
{{- end }}
volumes:
- name: wallarm
Expand Down
Loading
Loading