From f31ac82f8e6ec373e5cbd54d7ed36f022bf644a9 Mon Sep 17 00:00:00 2001 From: Steve Mattar Date: Tue, 2 Mar 2021 15:15:31 +0200 Subject: [PATCH] refactor: rename submariner-engine to submariner-gateway Signed-off-by: Steve Mattar --- Makefile | 2 +- submariner-operator/crds/crd.yaml | 2 +- submariner-operator/templates/NOTES.txt | 2 +- submariner-operator/templates/_helpers.tpl | 10 +++---- .../templates/operator-deployment.yaml | 2 +- submariner-operator/templates/rbac.yaml | 16 ++++++------ submariner-operator/templates/svc-acct.yaml | 4 +-- submariner-operator/values.yaml | 6 ++--- submariner/questions.yml | 22 ++++++++-------- submariner/templates/NOTES.txt | 2 +- submariner/templates/_helpers.tpl | 10 +++---- submariner/templates/engine-deploy.yaml | 26 +++++++++---------- submariner/templates/rbac.yaml | 16 ++++++------ submariner/templates/svc-acct.yaml | 4 +-- submariner/values.yaml | 6 ++--- 15 files changed, 65 insertions(+), 65 deletions(-) diff --git a/Makefile b/Makefile index 699a312c..8694e726 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ preload-images: source $(SCRIPTS_DIR)/lib/debug_functions; \ source $(SCRIPTS_DIR)/lib/deploy_funcs; \ set -e; \ - for image in submariner submariner-route-agent submariner-operator lighthouse-agent submariner-globalnet lighthouse-coredns; do \ + for image in submariner-gateway submariner-route-agent submariner-operator lighthouse-agent submariner-globalnet lighthouse-coredns; do \ import_image quay.io/submariner/$${image}; \ done diff --git a/submariner-operator/crds/crd.yaml b/submariner-operator/crds/crd.yaml index 46302724..763e82c2 100644 --- a/submariner-operator/crds/crd.yaml +++ b/submariner-operator/crds/crd.yaml @@ -105,7 +105,7 @@ spec: type: string colorCodes: type: string - engineDaemonSetStatus: + gatewayDaemonSetStatus: properties: lastResourceVersion: type: string diff --git a/submariner-operator/templates/NOTES.txt b/submariner-operator/templates/NOTES.txt index 98126181..1ea590ca 100644 --- a/submariner-operator/templates/NOTES.txt +++ b/submariner-operator/templates/NOTES.txt @@ -1,6 +1,6 @@ Submariner is now installed. -{{- if .Values.engine.nodeSelectorEnabled }} +{{- if .Values.gateway.nodeSelectorEnabled }} If you haven't done so yet, please label a node as `submariner.io/gateway=true` to elect it for running Submariner. {{- end }} diff --git a/submariner-operator/templates/_helpers.tpl b/submariner-operator/templates/_helpers.tpl index 2df8baaa..778ac0a6 100644 --- a/submariner-operator/templates/_helpers.tpl +++ b/submariner-operator/templates/_helpers.tpl @@ -43,13 +43,13 @@ Create the name of the submariner-operator service account to use {{- end -}} {{/* -Create the name of the submariner-engine service account to use +Create the name of the submariner-gateway service account to use */}} -{{- define "submariner.engineServiceAccountName" -}} -{{- if .Values.serviceAccounts.engine.create -}} - {{ default "submariner-engine" .Values.serviceAccounts.engine.name }} +{{- define "submariner.gatewayServiceAccountName" -}} +{{- if .Values.serviceAccounts.gateway.create -}} + {{ default "submariner-gateway" .Values.serviceAccounts.gateway.name }} {{- else -}} - {{ default "default" .Values.serviceAccounts.engine.name }} + {{ default "default" .Values.serviceAccounts.gateway.name }} {{- end -}} {{- end -}} diff --git a/submariner-operator/templates/operator-deployment.yaml b/submariner-operator/templates/operator-deployment.yaml index fc2812e3..5f84969c 100644 --- a/submariner-operator/templates/operator-deployment.yaml +++ b/submariner-operator/templates/operator-deployment.yaml @@ -6,7 +6,7 @@ metadata: release: {{ .Release.Name | quote }} chart: {{ template "submariner.chart" . }} app: {{ template "submariner.fullname" . }} - component: engine + component: gateway name: {{ template "submariner.fullname" . }} spec: progressDeadlineSeconds: 600 diff --git a/submariner-operator/templates/rbac.yaml b/submariner-operator/templates/rbac.yaml index 1000bfc0..dde1aee2 100644 --- a/submariner-operator/templates/rbac.yaml +++ b/submariner-operator/templates/rbac.yaml @@ -86,7 +86,7 @@ roleRef: apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: - name: {{ template "submariner.fullname" . }}:engine + name: {{ template "submariner.fullname" . }}:gateway labels: heritage: {{ .Release.Service | quote }} release: {{ .Release.Name | quote }} @@ -166,7 +166,7 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: {{ template "submariner.fullname" . }}:engine + name: {{ template "submariner.fullname" . }}:gateway labels: heritage: {{ .Release.Service | quote }} release: {{ .Release.Name | quote }} @@ -175,10 +175,10 @@ metadata: roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: {{ template "submariner.fullname" . }}:engine + name: {{ template "submariner.fullname" . }}:gateway subjects: - kind: ServiceAccount - name: {{ template "submariner.engineServiceAccountName" . }} + name: {{ template "submariner.gatewayServiceAccountName" . }} namespace: {{ .Release.Namespace }} --- apiVersion: rbac.authorization.k8s.io/v1 @@ -458,7 +458,7 @@ roleRef: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: {{ template "submariner.fullname" . }}:engine + name: {{ template "submariner.fullname" . }}:gateway labels: heritage: {{ .Release.Service | quote }} release: {{ .Release.Name | quote }} @@ -525,7 +525,7 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: {{ template "submariner.fullname" . }}:engine + name: {{ template "submariner.fullname" . }}:gateway labels: heritage: {{ .Release.Service | quote }} release: {{ .Release.Name | quote }} @@ -534,10 +534,10 @@ metadata: roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: {{ template "submariner.fullname" . }}:engine + name: {{ template "submariner.fullname" . }}:gateway subjects: - kind: ServiceAccount - name: {{ template "submariner.engineServiceAccountName" . }} + name: {{ template "submariner.gatewayServiceAccountName" . }} namespace: {{ .Release.Namespace }} --- apiVersion: rbac.authorization.k8s.io/v1 diff --git a/submariner-operator/templates/svc-acct.yaml b/submariner-operator/templates/svc-acct.yaml index 2cfc525c..a725fac9 100644 --- a/submariner-operator/templates/svc-acct.yaml +++ b/submariner-operator/templates/svc-acct.yaml @@ -10,11 +10,11 @@ metadata: app: {{ template "submariner.name" . }} {{- end }} --- -{{- if .Values.serviceAccounts.engine.create }} +{{- if .Values.serviceAccounts.gateway.create }} apiVersion: v1 kind: ServiceAccount metadata: - name: {{ template "submariner.engineServiceAccountName" . }} + name: {{ template "submariner.gatewayServiceAccountName" . }} labels: heritage: {{ .Release.Service | quote }} release: {{ .Release.Name | quote }} diff --git a/submariner-operator/values.yaml b/submariner-operator/values.yaml index 0e03d025..e680c8e9 100644 --- a/submariner-operator/values.yaml +++ b/submariner-operator/values.yaml @@ -37,15 +37,15 @@ operator: resources: {} tolerations: [] affinity: {} -engine: +gateway: image: - repository: quay.io/submariner/submariner + repository: quay.io/submariner/submariner-gateway tag: "0.7.0" serviceAccounts: operator: create: true name: "" - engine: + gateway: create: true name: "" routeAgent: diff --git a/submariner/questions.yml b/submariner/questions.yml index 5760c9fe..d04fa30d 100644 --- a/submariner/questions.yml +++ b/submariner/questions.yml @@ -1,22 +1,22 @@ questions: -- variable: defaultEngineImage +- variable: defaultGatewayImage default: true - description: "Use default Submariner Engine image or specify a custom one" - label: Use default submariner engine image + description: "Use default Submariner Gateway image or specify a custom one" + label: Use default submariner gateway image type: boolean show_subquestion_if: false group: "Container Images" subquestions: - - variable: engine.image.repository - default: "quay.io/submariner/submariner" - description: "Submariner Engine Image Repository" + - variable: gateway.image.repository + default: "quay.io/submariner/submariner-gateway" + description: "Submariner Gateway Image Repository" type: string - label: Submariner Engine Image Repository - - variable: engine.image.tag + label: Submariner Gateway Image Repository + - variable: gateway.image.tag default: "0.6.0" - description: "Submariner Engine Image Tag" + description: "Submariner Gateway Image Tag" type: string - label: Submariner Engine Image Tag + label: Submariner Gateway Image Tag - variable: defaultRouteAgentImage default: true description: "Use default Submariner Route Agent image or specify a custom one" @@ -35,7 +35,7 @@ questions: description: "Submariner Route Agent Image Tag" type: string label: Submariner Route Agent Image Tag -- variable: engine.nodeSelectorEnabled +- variable: gateway.nodeSelectorEnabled default: true description: "Restrict submariner to nodes labeled with submariner.io/gateway=true" label: Restrict gateway deployments to specific nodes diff --git a/submariner/templates/NOTES.txt b/submariner/templates/NOTES.txt index 98126181..1ea590ca 100644 --- a/submariner/templates/NOTES.txt +++ b/submariner/templates/NOTES.txt @@ -1,6 +1,6 @@ Submariner is now installed. -{{- if .Values.engine.nodeSelectorEnabled }} +{{- if .Values.gateway.nodeSelectorEnabled }} If you haven't done so yet, please label a node as `submariner.io/gateway=true` to elect it for running Submariner. {{- end }} diff --git a/submariner/templates/_helpers.tpl b/submariner/templates/_helpers.tpl index 99477b3e..b0104c95 100644 --- a/submariner/templates/_helpers.tpl +++ b/submariner/templates/_helpers.tpl @@ -32,13 +32,13 @@ Create chart name and version as used by the chart label. {{- end -}} {{/* -Create the name of the submariner-engine service account to use +Create the name of the submariner-gateway service account to use */}} -{{- define "submariner.engineServiceAccountName" -}} -{{- if .Values.serviceAccounts.engine.create -}} - {{ default "submariner-engine" .Values.serviceAccounts.engine.name }} +{{- define "submariner.gatewayServiceAccountName" -}} +{{- if .Values.serviceAccounts.gateway.create -}} + {{ default "submariner-gateway" .Values.serviceAccounts.gateway.name }} {{- else -}} - {{ default "default" .Values.serviceAccounts.engine.name }} + {{ default "default" .Values.serviceAccounts.gateway.name }} {{- end -}} {{- end -}} diff --git a/submariner/templates/engine-deploy.yaml b/submariner/templates/engine-deploy.yaml index a58747cf..259f87ab 100644 --- a/submariner/templates/engine-deploy.yaml +++ b/submariner/templates/engine-deploy.yaml @@ -5,14 +5,14 @@ metadata: heritage: {{ .Release.Service | quote }} release: {{ .Release.Name | quote }} chart: {{ template "submariner.chart" . }} - app: {{ template "submariner.fullname" . }}-engine - component: engine + app: {{ template "submariner.fullname" . }}-gateway + component: gateway name: {{ template "submariner.fullname" . }}-gateway spec: revisionHistoryLimit: 5 selector: matchLabels: - app: {{ template "submariner.fullname" . }}-engine + app: {{ template "submariner.fullname" . }}-gateway updateStrategy: rollingUpdate: maxUnavailable: 1 @@ -21,7 +21,7 @@ spec: metadata: creationTimestamp: null labels: - app: {{ template "submariner.fullname" . }}-engine + app: {{ template "submariner.fullname" . }}-gateway spec: affinity: podAntiAffinity: @@ -31,19 +31,19 @@ spec: - key: app operator: In values: - - {{ template "submariner.fullname" . }}-engine + - {{ template "submariner.fullname" . }}-gateway topologyKey: "kubernetes.io/hostname" -{{- with .Values.engine.affinity }} +{{- with .Values.gateway.affinity }} {{ toYaml . | indent 8 }} {{- end }} nodeSelector: -{{- if .Values.engine.nodeSelectorEnabled }} +{{- if .Values.gateway.nodeSelectorEnabled }} submariner.io/gateway: "true" {{- end }} -{{- with .Values.engine.nodeSelector }} +{{- with .Values.gateway.nodeSelector }} {{ toYaml . | indent 8 }} {{- end }} -{{- with .Values.engine.tolerations }} +{{- with .Values.gateway.tolerations }} tolerations: {{ toYaml . | indent 8 }} {{- end }} @@ -112,11 +112,11 @@ spec: valueFrom: fieldRef: fieldPath: "spec.nodeName" - image: {{ .Values.engine.image.repository }}:{{ default .Chart.AppVersion .Values.engine.image.tag }} - imagePullPolicy: {{ .Values.engine.image.pullPolicy }} + image: {{ .Values.gateway.image.repository }}:{{ default .Chart.AppVersion .Values.gateway.image.tag }} + imagePullPolicy: {{ .Values.gateway.image.pullPolicy }} name: submariner resources: -{{ toYaml .Values.engine.resources | indent 10 }} +{{ toYaml .Values.gateway.resources | indent 10 }} securityContext: allowPrivilegeEscalation: true capabilities: @@ -135,4 +135,4 @@ spec: schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 1 - serviceAccountName: {{ template "submariner.engineServiceAccountName" . }} + serviceAccountName: {{ template "submariner.gatewayServiceAccountName" . }} diff --git a/submariner/templates/rbac.yaml b/submariner/templates/rbac.yaml index 94563eb8..d2240bce 100644 --- a/submariner/templates/rbac.yaml +++ b/submariner/templates/rbac.yaml @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: - name: {{ template "submariner.fullname" . }}:engine + name: {{ template "submariner.fullname" . }}:gateway labels: heritage: {{ .Release.Service | quote }} release: {{ .Release.Name | quote }} @@ -82,7 +82,7 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: {{ template "submariner.fullname" . }}:engine + name: {{ template "submariner.fullname" . }}:gateway labels: heritage: {{ .Release.Service | quote }} release: {{ .Release.Name | quote }} @@ -91,10 +91,10 @@ metadata: roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: {{ template "submariner.fullname" . }}:engine + name: {{ template "submariner.fullname" . }}:gateway subjects: - kind: ServiceAccount - name: {{ template "submariner.engineServiceAccountName" . }} + name: {{ template "submariner.gatewayServiceAccountName" . }} namespace: {{ .Release.Namespace }} --- apiVersion: rbac.authorization.k8s.io/v1 @@ -299,7 +299,7 @@ subjects: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: {{ template "submariner.fullname" . }}:engine + name: {{ template "submariner.fullname" . }}:gateway labels: heritage: {{ .Release.Service | quote }} release: {{ .Release.Name | quote }} @@ -366,7 +366,7 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: {{ template "submariner.fullname" . }}:engine + name: {{ template "submariner.fullname" . }}:gateway labels: heritage: {{ .Release.Service | quote }} release: {{ .Release.Name | quote }} @@ -375,10 +375,10 @@ metadata: roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: {{ template "submariner.fullname" . }}:engine + name: {{ template "submariner.fullname" . }}:gateway subjects: - kind: ServiceAccount - name: {{ template "submariner.engineServiceAccountName" . }} + name: {{ template "submariner.gatewayServiceAccountName" . }} namespace: {{ .Release.Namespace }} --- apiVersion: rbac.authorization.k8s.io/v1 diff --git a/submariner/templates/svc-acct.yaml b/submariner/templates/svc-acct.yaml index 154c2c97..0bfb5a93 100644 --- a/submariner/templates/svc-acct.yaml +++ b/submariner/templates/svc-acct.yaml @@ -1,8 +1,8 @@ -{{- if .Values.serviceAccounts.engine.create }} +{{- if .Values.serviceAccounts.gateway.create }} apiVersion: v1 kind: ServiceAccount metadata: - name: {{ template "submariner.engineServiceAccountName" . }} + name: {{ template "submariner.gatewayServiceAccountName" . }} labels: heritage: {{ .Release.Service | quote }} release: {{ .Release.Name | quote }} diff --git a/submariner/values.yaml b/submariner/values.yaml index 4a2ced62..72e800f0 100644 --- a/submariner/values.yaml +++ b/submariner/values.yaml @@ -29,9 +29,9 @@ leadership: leaseDuration: 10 renewDeadline: 5 retryPeriod: 2 -engine: +gateway: image: - repository: quay.io/submariner/submariner + repository: quay.io/submariner/submariner-gateway tag: "" pullPolicy: IfNotPresent resources: {} @@ -65,7 +65,7 @@ lighthouseCoredns: tag: "" pullPolicy: IfNotPresent serviceAccounts: - engine: + gateway: create: true name: "" routeAgent: