Skip to content

Commit

Permalink
Merge pull request #5977 from vitessio/revert-5853-fix-5278
Browse files Browse the repository at this point in the history
Revert "Enable alternate registries to be able to be used"
  • Loading branch information
derekperkins authored Mar 27, 2020
2 parents e522127 + 6614118 commit 490bac1
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 84 deletions.
6 changes: 1 addition & 5 deletions helm/vitess/templates/_cron-jobs.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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
---
Expand Down Expand Up @@ -59,7 +55,7 @@ spec:

containers:
- name: backup
image: "{{$vtctlclientImage}}:{{$vitessTag}}"
image: "vitess/vtctlclient:{{$vitessTag}}"
volumeMounts:
{{ include "user-secret-volumeMounts" $defaultVtctlclient.secrets | indent 14 }}

Expand Down
8 changes: 2 additions & 6 deletions helm/vitess/templates/_jobs.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
{{- $namespace := index . 2 -}}

{{- $vitessTag := $job.vitessTag | default $defaultVtctlclient.vitessTag -}}
{{- $vtctlclientImage := $defaultVtctlclient.vtctlclientImage -}}
{{- $secrets := $job.secrets | default $defaultVtctlclient.secrets }}
---
###################################
Expand All @@ -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:
Expand All @@ -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 }}
---
###################################
Expand All @@ -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:
Expand Down
5 changes: 2 additions & 3 deletions helm/vitess/templates/_keyspace.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}

Expand Down Expand Up @@ -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 }}
Expand Down
5 changes: 2 additions & 3 deletions helm/vitess/templates/_orchestrator.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# set tuple values to more recognizable variables
{{- $orc := index . 0 -}}
{{- $defaultVtctlclient := index . 1 }}
{{- $logtail := index . 2 }}

apiVersion: v1
kind: Service
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion helm/vitess/templates/_pmm.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
spec:
containers:
- name: pmm
image: "{{ $pmm.image}}:{{ $pmm.pmmTag }}"
image: "percona/pmm-server:{{ $pmm.pmmTag }}"

ports:
- name: web
Expand Down
7 changes: 2 additions & 5 deletions helm/vitess/templates/_shard.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
{{- with $cell.vtctld }}
# define image to use
{{- $vitessTag := .vitessTag | default $defaultVtctlclient.vitessTag }}
{{- $vtctlclientImage := .vtctlclientImage | default $defaultVtctlclient.vtctlclientImage }}


---
###################################
# InitShardMaster Job
Expand All @@ -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 }}

Expand Down Expand Up @@ -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 }}

Expand Down
3 changes: 1 addition & 2 deletions helm/vitess/templates/_vtctld.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

# define image to use
{{- $vitessTag := .vitessTag | default $defaultVtctld.vitessTag -}}
{{- $vtcldImage := .vtcldImage | default $defaultVtctld.vtcldImage -}}
{{- $cellClean := include "clean-label" $cell.name }}

###################################
Expand Down Expand Up @@ -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:
Expand Down
10 changes: 4 additions & 6 deletions helm/vitess/templates/_vtgate.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

# define image to use
{{- $vitessTag := .vitessTag | default $defaultVtgate.vitessTag -}}
{{- $vtgateImage := .vtgateImage | default $defaultVtgate.vtgateImage -}}
{{- $cellClean := include "clean-label" $cell.name }}

###################################
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
46 changes: 14 additions & 32 deletions helm/vitess/templates/_vttablet.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
Expand All @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions helm/vitess/templates/vitess.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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) }}
Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit 490bac1

Please sign in to comment.