refactor: globalnet should be under the broker

Signed-off-by: Steve Mattar <smattar@redhat.com>
This commit is contained in:
Steve Mattar
2021-03-10 16:41:48 +02:00
committed by Steve Mattar
parent 8d6ca0bd1d
commit 64d7c11506
11 changed files with 49 additions and 16 deletions
+11 -1
View File
@@ -6,13 +6,23 @@ include $(SHIPYARD_DIR)/Makefile.inc
CLUSTER_SETTINGS_FLAG = --cluster_settings $(DAPPER_SOURCE)/cluster_settings
override CLUSTERS_ARGS += $(CLUSTER_SETTINGS_FLAG)
override DEPLOY_ARGS += $(CLUSTER_SETTINGS_FLAG) --deploytool helm --deploytool_broker_args '--set submariner.serviceDiscovery=true'
override DEPLOY_ARGS += $(CLUSTER_SETTINGS_FLAG) --deploytool helm
export DEPLOY_ARGS
GH_URL=https://submariner-io.github.io/submariner-charts/charts
CHARTS_DIR=charts
CHARTS_VERSION=0.7.0
REPO_URL=$(shell git config remote.origin.url)
# Process extra flags from the `using=a,b,c` optional flag
ifneq (,$(filter lighthouse,$(_using)))
override DEPLOY_ARGS += --service_discovery
endif
ifneq (,$(filter globalnet,$(_using)))
override DEPLOY_ARGS += --globalnet
endif
# Targets to make
deploy: clusters preload-images
+4
View File
@@ -51,12 +51,16 @@ function helm_install_subm() {
--set broker.token="${submariner_broker_token}" \
--set broker.namespace="${SUBMARINER_BROKER_NS}" \
--set broker.ca="${submariner_broker_ca}" \
--set broker.globalnet="${globalnet}" \
--set submariner.serviceDiscovery="${service_discovery}" \
--set submariner.cableDriver="${cable_driver}" \
--set submariner.clusterId="${cluster}" \
--set submariner.clusterCidr="${cluster_CIDRs[$cluster]}" \
--set submariner.serviceCidr="${service_CIDRs[$cluster]}" \
--set submariner.globalCidr="${global_CIDRs[$cluster]}" \
--set serviceAccounts.globalnet.create="${globalnet}" \
--set serviceAccounts.lighthouseAgent.create="${service_discovery}" \
--set serviceAccounts.lighthouseCoreDns.create="${service_discovery}" \
--set submariner.natEnabled="false" \
--set operator.image.repository="localhost:5000/submariner-operator" \
--set operator.image.tag="local" \
-2
View File
@@ -7,5 +7,3 @@ serviceAccounts:
client:
create: true
name: ""
submariner:
serviceDiscovery: false
+14 -1
View File
@@ -92,7 +92,20 @@ questions:
label: "Service CIDR"
group: "CIDR Configuration"
required: true
- variable: submariner.globalCidr
- variable: submariner.serviceDiscovery
type: boolean
default: false
group: "Advanced Configuration"
description: "Enable multicluster service discovery"
label: "Service Discovery Enabled"
- variable: broker.globalnet
type: boolean
default: false
group: "Broker Configuration"
description: "Enable support for overlapping Cluster/Service CIDRs in connecting clusters"
label: "Globalnet Enabled"
subquestions:
- variable: submariner.globalCidr
default: ""
description: "Enter the globalnet CIDR (i.e. 169.254.1.0/24) for this cluster if using globalnet"
type: string
+2 -2
View File
@@ -279,7 +279,7 @@ subjects:
name: {{ template "submariner.routeAgentServiceAccountName" . }}
namespace: {{ .Release.Namespace }}
---
{{- if ne .Values.submariner.globalCidr "" }}
{{- if .Values.broker.globalnet }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
@@ -622,7 +622,7 @@ subjects:
name: {{ template "submariner.routeAgentServiceAccountName" . }}
namespace: {{ .Release.Namespace }}
---
{{- if ne .Values.submariner.globalCidr "" }}
{{- if .Values.broker.globalnet }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
+1
View File
@@ -19,6 +19,7 @@ broker:
namespace: xyz
insecure: false
ca: ""
globalnet: false
rbac:
create: true
ipsec:
+6
View File
@@ -136,3 +136,9 @@ questions:
group: "Advanced Configuration"
description: "Cable driver implementation"
label: "Cable Driver"
- variable: submariner.serviceDiscovery
type: boolean
default: false
group: "Advanced Configuration"
description: "Enable multicluster service discovery"
label: "Service Discovery Enabled"
+1 -1
View File
@@ -1,4 +1,4 @@
{{- if ne .Values.submariner.globalCidr "" }}
{{- if .Values.broker.globalnet }}
apiVersion: apps/v1
kind: DaemonSet
metadata:
+1 -1
View File
@@ -30,7 +30,7 @@ spec:
value: "{{ .Values.submariner.clusterId }}"
- name: SUBMARINER_DEBUG
value: "{{ .Values.submariner.debug }}"
{{- if ne .Values.submariner.globalCidr "" }}
{{- if .Values.broker.globalnet }}
- name: SUBMARINER_GLOBALNET_ENABLED
value: "true"
{{- end }}
+2 -2
View File
@@ -195,7 +195,7 @@ subjects:
name: {{ template "submariner.routeAgentServiceAccountName" . }}
namespace: {{ .Release.Namespace }}
---
{{- if ne .Values.submariner.globalCidr "" }}
{{- if .Values.broker.globalnet }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
@@ -463,7 +463,7 @@ subjects:
name: {{ template "submariner.routeAgentServiceAccountName" . }}
namespace: {{ .Release.Namespace }}
---
{{- if ne .Values.submariner.globalCidr "" }}
{{- if .Values.broker.globalnet }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
+1
View File
@@ -19,6 +19,7 @@ broker:
namespace: xyz
insecure: false
ca: ""
globalnet: false
rbac:
create: true
ipsec: