diff --git a/helm/vitess/templates/_cron-jobs.tpl b/helm/vitess/templates/_cron-jobs.tpl index 41a5986b7c8..3b4ffd13852 100644 --- a/helm/vitess/templates/_cron-jobs.tpl +++ b/helm/vitess/templates/_cron-jobs.tpl @@ -14,10 +14,6 @@ {{- $namespace := index . 8 -}} {{- $defaultVtctlclient := index . 9 }} - -{{- $vitessTag := $defaultVtctlclient.vitessTag -}} -{{- $vtctlclientImage := $defaultVtctlclient.vtctlclientImage -}} - {{ if $backup.enabled }} # create cron job for current shard --- @@ -59,7 +55,7 @@ spec: containers: - name: backup - image: "{{$vtctlclientImage}}:{{$vitessTag}}" + image: "vitess/vtctlclient:{{$vitessTag}}" volumeMounts: {{ include "user-secret-volumeMounts" $defaultVtctlclient.secrets | indent 14 }} diff --git a/helm/vitess/templates/_jobs.tpl b/helm/vitess/templates/_jobs.tpl index c27fe5105d6..45d389ff50e 100644 --- a/helm/vitess/templates/_jobs.tpl +++ b/helm/vitess/templates/_jobs.tpl @@ -8,7 +8,6 @@ {{- $namespace := index . 2 -}} {{- $vitessTag := $job.vitessTag | default $defaultVtctlclient.vitessTag -}} -{{- $vtctlclientImage := $defaultVtctlclient.vtctlclientImage -}} {{- $secrets := $job.secrets | default $defaultVtctlclient.secrets }} --- ################################### @@ -31,7 +30,7 @@ spec: restartPolicy: OnFailure containers: - name: vtjob - image: "{{$vtctlclientImage}}:{{$vitessTag}}" + image: "vitess/vtctlclient:{{$vitessTag}}" volumeMounts: {{ include "user-secret-volumeMounts" $defaultVtctlclient.secrets | indent 10 }} resources: @@ -57,9 +56,6 @@ spec: {{- $namespace := index . 2 -}} {{- $vitessTag := $job.vitessTag | default $defaultVtworker.vitessTag -}} -{{- $vtworkerImage := $job.vtworkerImage | default $defaultVtworker.vtworkerImage -}} - - {{- $secrets := $job.secrets | default $defaultVtworker.secrets }} --- ################################### @@ -83,7 +79,7 @@ spec: restartPolicy: OnFailure containers: - name: vtjob - image: "{{$vtworkerImage}}:{{$vitessTag}}" + image: "vitess/vtworker:{{$vitessTag}}" volumeMounts: {{ include "user-secret-volumeMounts" $defaultVtworker.secrets | indent 10 }} resources: diff --git a/helm/vitess/templates/_keyspace.tpl b/helm/vitess/templates/_keyspace.tpl index 8fc74efd9ae..2ba9f6872c3 100644 --- a/helm/vitess/templates/_keyspace.tpl +++ b/helm/vitess/templates/_keyspace.tpl @@ -15,7 +15,6 @@ # define image to use {{- $vitessTag := .vitessTag | default $defaultVtctlclient.vitessTag -}} -{{- $vtctlclientImage := .vtctlclientImage | default $defaultVtctlclient.vtctlclientImage -}} {{- $secrets := .secrets | default $defaultVtctlclient.secrets -}} {{- range $name, $schema := $keyspace.schema }} @@ -34,7 +33,7 @@ spec: restartPolicy: OnFailure containers: - name: apply-schema - image: "{{$vtctlclientImage}}:{{$vitessTag}}" + image: "vitess/vtctlclient:{{$vitessTag}}" volumeMounts: {{ include "user-secret-volumeMounts" $defaultVtctlclient.secrets | indent 10 }} @@ -101,7 +100,7 @@ spec: restartPolicy: OnFailure containers: - name: apply-vschema - image: "{{$vtctlclientImage}}:{{$vitessTag}}" + image: "vitess/vtctlclient:{{$vitessTag}}" volumeMounts: {{ include "user-secret-volumeMounts" $defaultVtctlclient.secrets | indent 10 }} diff --git a/helm/vitess/templates/_orchestrator.tpl b/helm/vitess/templates/_orchestrator.tpl index ba15ae4e4dc..13ad07831aa 100644 --- a/helm/vitess/templates/_orchestrator.tpl +++ b/helm/vitess/templates/_orchestrator.tpl @@ -5,7 +5,6 @@ # set tuple values to more recognizable variables {{- $orc := index . 0 -}} {{- $defaultVtctlclient := index . 1 }} -{{- $logtail := index . 2 }} apiVersion: v1 kind: Service @@ -124,7 +123,7 @@ spec: value: "15999" - name: recovery-log - image: "{{ $logtail.image }}:{{ $logtail.tag }}" + image: vitess/logtail:helm-1.0.7-5 imagePullPolicy: IfNotPresent env: - name: TAIL_FILEPATH @@ -134,7 +133,7 @@ spec: mountPath: /tmp - name: audit-log - image: "{{ $logtail.image }}:{{ $logtail.tag }}" + image: vitess/logtail:helm-1.0.7-5 imagePullPolicy: IfNotPresent env: - name: TAIL_FILEPATH diff --git a/helm/vitess/templates/_pmm.tpl b/helm/vitess/templates/_pmm.tpl index c5fec6a68e5..9669f58298d 100644 --- a/helm/vitess/templates/_pmm.tpl +++ b/helm/vitess/templates/_pmm.tpl @@ -50,7 +50,7 @@ spec: spec: containers: - name: pmm - image: "{{ $pmm.image}}:{{ $pmm.pmmTag }}" + image: "percona/pmm-server:{{ $pmm.pmmTag }}" ports: - name: web diff --git a/helm/vitess/templates/_shard.tpl b/helm/vitess/templates/_shard.tpl index 6f9d330306d..3d075c24f85 100644 --- a/helm/vitess/templates/_shard.tpl +++ b/helm/vitess/templates/_shard.tpl @@ -18,9 +18,6 @@ {{- with $cell.vtctld }} # define image to use {{- $vitessTag := .vitessTag | default $defaultVtctlclient.vitessTag }} -{{- $vtctlclientImage := .vtctlclientImage | default $defaultVtctlclient.vtctlclientImage }} - - --- ################################### # InitShardMaster Job @@ -45,7 +42,7 @@ spec: restartPolicy: OnFailure containers: - name: init-shard-master - image: "{{$vtctlclientImage}}:{{$vitessTag}}" + image: "vitess/vtctlclient:{{$vitessTag}}" volumeMounts: {{ include "user-secret-volumeMounts" $defaultVtctlclient.secrets | indent 10 }} @@ -148,7 +145,7 @@ spec: restartPolicy: OnFailure containers: - name: copy-schema - image: "{{$vtctlclientImage}}/:{{$vitessTag}}" + image: "vitess/vtctlclient:{{$vitessTag}}" volumeMounts: {{ include "user-secret-volumeMounts" $defaultVtctlclient.secrets | indent 10 }} diff --git a/helm/vitess/templates/_vtctld.tpl b/helm/vitess/templates/_vtctld.tpl index 98d8ba4291b..af178035e99 100644 --- a/helm/vitess/templates/_vtctld.tpl +++ b/helm/vitess/templates/_vtctld.tpl @@ -13,7 +13,6 @@ # define image to use {{- $vitessTag := .vitessTag | default $defaultVtctld.vitessTag -}} -{{- $vtcldImage := .vtcldImage | default $defaultVtctld.vtcldImage -}} {{- $cellClean := include "clean-label" $cell.name }} ################################### @@ -60,7 +59,7 @@ spec: {{ include "vtctld-affinity" (tuple $cellClean $cell.region) | indent 6 }} containers: - name: vtctld - image: {{$vtcldImage}}:{{$vitessTag}} + image: vitess/vtctld:{{$vitessTag}} imagePullPolicy: IfNotPresent readinessProbe: httpGet: diff --git a/helm/vitess/templates/_vtgate.tpl b/helm/vitess/templates/_vtgate.tpl index 62ec33ecd27..1455e9c47a2 100644 --- a/helm/vitess/templates/_vtgate.tpl +++ b/helm/vitess/templates/_vtgate.tpl @@ -12,7 +12,6 @@ # define image to use {{- $vitessTag := .vitessTag | default $defaultVtgate.vitessTag -}} -{{- $vtgateImage := .vtgateImage | default $defaultVtgate.vtgateImage -}} {{- $cellClean := include "clean-label" $cell.name }} ################################### @@ -69,13 +68,13 @@ spec: {{ if $cell.mysqlProtocol.enabled }} {{ if eq $cell.mysqlProtocol.authType "secret" }} initContainers: -{{ include "init-mysql-creds" (tuple $vitessTag $vtgateImage $cell) | indent 8 }} +{{ include "init-mysql-creds" (tuple $vitessTag $cell) | indent 8 }} {{ end }} {{ end }} containers: - name: vtgate - image: {{$vtgateImage}}:{{$vitessTag}} + image: vitess/vtgate:{{$vitessTag}} imagePullPolicy: IfNotPresent readinessProbe: httpGet: @@ -219,13 +218,12 @@ affinity: ################################### {{ define "init-mysql-creds" -}} {{- $vitessTag := index . 0 -}} -{{- $vtgateImage := index . 1 -}} -{{- $cell := index . 2 -}} +{{- $cell := index . 1 -}} {{- with $cell.mysqlProtocol }} - name: init-mysql-creds - image: "{{$vtgateImage}}:{{$vitessTag}}" + image: "vitess/vtgate:{{$vitessTag}}" imagePullPolicy: IfNotPresent volumeMounts: - name: creds diff --git a/helm/vitess/templates/_vttablet.tpl b/helm/vitess/templates/_vttablet.tpl index c27774ae936..3053407af4d 100644 --- a/helm/vitess/templates/_vttablet.tpl +++ b/helm/vitess/templates/_vttablet.tpl @@ -48,10 +48,6 @@ spec: {{- $config := index . 8 -}} {{- $pmm := index . 9 -}} {{- $orc := index . 10 -}} -{{- $mysqlctld := index . 11 -}} -{{- $logrotate := index . 12 -}} -{{- $logtail := index . 13 -}} -{{- $vtctl := index . 14 -}} # sanitize inputs for labels {{- $cellClean := include "clean-label" $cell.name -}} @@ -65,7 +61,6 @@ spec: # define images to use {{- $vitessTag := .vitessTag | default $defaultVttablet.vitessTag -}} -{{- $vtctlclientImage := .vtctlclientImage | default $defaultVttablet.vtctlclientImage -}} {{- $image := .image | default $defaultVttablet.image -}} {{- $mysqlImage := .mysqlImage | default $defaultVttablet.mysqlImage -}} {{- $mysqlImage := .mysqlImage | default $defaultVttablet.mysqlImage }} @@ -106,17 +101,17 @@ spec: {{ include "vttablet-affinity" (tuple $cellClean $keyspaceClean $shardClean $cell.region) | indent 6 }} initContainers: -{{ include "init-mysql" (tuple $vitessTag $cellClean $mysqlctld) | indent 8 }} -{{ include "init-vttablet" (tuple $vitessTag $cell $cellClean $namespace $mysqlctld $vtctl) | indent 8 }} +{{ include "init-mysql" (tuple $vitessTag $cellClean) | indent 8 }} +{{ include "init-vttablet" (tuple $vitessTag $cell $cellClean $namespace) | indent 8 }} containers: {{ include "cont-mysql" (tuple $topology $cell $keyspace $shard $tablet $defaultVttablet $uid) | indent 8 }} {{ include "cont-vttablet" (tuple $topology $cell $keyspace $shard $tablet $defaultVttablet $defaultVtctlclient $vitessTag $uid $namespace $config $orc) | indent 8 }} -{{ include "cont-logrotate" (tuple $logrotate) | indent 8 }} -{{ include "cont-mysql-generallog" (tuple $logrotate) | indent 8 }} -{{ include "cont-mysql-errorlog" (tuple $logrotate) | indent 8 }} -{{ include "cont-mysql-slowlog" (tuple $logrotate) | indent 8 }} -{{ if $pmm.enabled }}{{ include "cont-pmm-client" (tuple $pmm $namespace $keyspace $logtail) | indent 8 }}{{ end }} +{{ include "cont-logrotate" . | indent 8 }} +{{ include "cont-mysql-generallog" . | indent 8 }} +{{ include "cont-mysql-errorlog" . | indent 8 }} +{{ include "cont-mysql-slowlog" . | indent 8 }} +{{ if $pmm.enabled }}{{ include "cont-pmm-client" (tuple $pmm $namespace $keyspace) | indent 8 }}{{ end }} volumes: - name: vt @@ -169,13 +164,9 @@ spec: {{ define "init-mysql" -}} {{- $vitessTag := index . 0 -}} {{- $cellClean := index . 1 }} -{{- $mysqlctld := index . 2 }} - -{{- $vitessTag := $mysqlctld.vitessTag -}} -{{- $mysqlctldImage := $mysqlctld.mysqlctldImage -}} - name: "init-mysql" - image: "{{$mysqlctldImage}}:{{$vitessTag}}" + image: "vitess/mysqlctld:{{$vitessTag}}" imagePullPolicy: IfNotPresent volumeMounts: - name: vtdataroot @@ -218,11 +209,9 @@ spec: {{- $cell := index . 1 -}} {{- $cellClean := index . 2 -}} {{- $namespace := index . 3 }} -{{- $vtctl := index . 4 }} - - name: init-vttablet - image: "{{$vtctl.vtctlImage}}:{{$vitessTag}}" + image: "vitess/vtctl:{{$vitessTag}}" imagePullPolicy: IfNotPresent volumeMounts: - name: vtdataroot @@ -286,11 +275,8 @@ spec: {{- $cellClean := include "clean-label" $cell.name -}} {{- with $tablet.vttablet }} -{{- $vitessTag := $defaultVttablet.vitessTag -}} -{{- $vttabletImage := $defaultVttablet.vttabletImage -}} - - name: vttablet - image: "{{$vttabletImage}}:{{$vitessTag}}" + image: "vitess/vttablet:{{$vitessTag}}" imagePullPolicy: IfNotPresent readinessProbe: httpGet: @@ -546,10 +532,9 @@ spec: # run logrotate for all log files in /vtdataroot/tabletdata ########################## {{ define "cont-logrotate" }} -{{- $logrotate := index . 0 }} - name: logrotate - image: {{ $logrotate.image }}:{{ $logrotate.tag }} + image: vitess/logrotate:helm-1.0.7-5 imagePullPolicy: IfNotPresent volumeMounts: - name: vtdataroot @@ -561,10 +546,9 @@ spec: # redirect the error log file to stdout ########################## {{ define "cont-mysql-errorlog" }} -{{- $logtail := index . 0 -}} - name: error-log - image: {{ $logtail.image }}:{{ $logtail.tag }} + image: vitess/logtail:helm-1.0.7-5 imagePullPolicy: IfNotPresent env: @@ -580,10 +564,9 @@ spec: # redirect the slow log file to stdout ########################## {{ define "cont-mysql-slowlog" }} -{{- $logtail := index . 0 -}} - name: slow-log - image: {{ $logtail.image }}:{{ $logtail.tag }} + image: vitess/logtail:helm-1.0.7-5 imagePullPolicy: IfNotPresent env: @@ -599,10 +582,9 @@ spec: # redirect the general log file to stdout ########################## {{ define "cont-mysql-generallog" }} -{{- $logtail := index . 0 -}} - name: general-log - image: {{ $logtail.image }}:{{ $logtail.tag }} + image: vitess/logtail:helm-1.0.7-5 imagePullPolicy: IfNotPresent env: diff --git a/helm/vitess/templates/vitess.yaml b/helm/vitess/templates/vitess.yaml index 62dc8d50f42..7c3d36aac25 100644 --- a/helm/vitess/templates/vitess.yaml +++ b/helm/vitess/templates/vitess.yaml @@ -12,7 +12,7 @@ {{ if $.Values.orchestrator.enabled }} # create orchestrator global services and StatefulSet -{{ include "orchestrator" (tuple $.Values.orchestrator $.Values.vtctlclient $.Values.logtail) }} +{{ include "orchestrator" (tuple $.Values.orchestrator $.Values.vtctlclient) }} --- # create orchestrator config map {{ include "orchestrator-config" (tuple $.Values.orchestrator $.Release.Namespace $.Values.vttablet.enableHeartbeat $.Values.vtctlclient) }} @@ -66,7 +66,7 @@ # Tablet initializations {{ range $tablet := $shard.tablets }} - {{ include "vttablet" (tuple $.Values.topology $cell $keyspace $shard $tablet $.Values.vttablet $.Values.vtctlclient $.Release.Namespace $.Values.config $.Values.pmm $.Values.orchestrator $.Values.mysqlctld $.Values.logrotate $.Values.logtail $.Values.vtctl) }} + {{ include "vttablet" (tuple $.Values.topology $cell $keyspace $shard $tablet $.Values.vttablet $.Values.vtctlclient $.Release.Namespace $.Values.config $.Values.pmm $.Values.orchestrator) }} {{ end }} # range $tablet {{ end }} # range $shard {{ end }} # range $keyspace diff --git a/helm/vitess/values.yaml b/helm/vitess/values.yaml index 59af5639aee..96ef944051c 100644 --- a/helm/vitess/values.yaml +++ b/helm/vitess/values.yaml @@ -181,7 +181,6 @@ etcd: vtctld: serviceType: ClusterIP vitessTag: helm-1.0.7-5 - vtcldImage: vitess/vtctld resources: # requests: # cpu: 100m @@ -193,7 +192,6 @@ vtctld: vtgate: serviceType: ClusterIP vitessTag: helm-1.0.7-5 - vtgateImage: vitess/vtgate resources: # requests: # cpu: 500m @@ -213,14 +211,12 @@ vtgate: # Default values for vtctlclient resources defined in 'topology' vtctlclient: vitessTag: helm-1.0.7-5 - vtctlclientImage: vitess/vtctlclient extraFlags: {} secrets: [] # secrets are mounted under /vt/usersecrets/{secretname} # Default values for vtworker resources defined in 'jobs' vtworker: vitessTag: helm-1.0.7-5 - vtworkerImage: vitess/vtworker extraFlags: {} resources: # requests: @@ -232,7 +228,7 @@ vtworker: # Default values for vttablet resources defined in 'topology' vttablet: vitessTag: helm-1.0.7-5 - vttabletImage: vitess/vttablet + # valid values are # - mysql56 (for MySQL 8.0) # - mysql56 (for MySQL/Percona 5.6 or 5.7) @@ -325,20 +321,10 @@ vttablet: requests: storage: 10Gi -# Default values for mysqlctld resources defined in 'topology' -mysqlctld: - vitessTag: helm-1.0.7-5 - mysqlctldImage: vitess/mysqlctld - -vtctl: - vitessTag: helm-1.0.7-5 - vtctlImage: vitess/vtctl - # Default values for pmm pmm: enabled: false pmmTag: 1.17.0 - image : percona/pmm-server client: resources: requests: @@ -399,7 +385,3 @@ orchestrator: requests: cpu: 50m memory: 350Mi - -logrotate: - vitessTag: 3.1.1 - image: vitess/orchestrator