UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Commit 66fd6a46 authored by Michael Martin's avatar Michael Martin
Browse files

Merge branch 'istio-sandbox' into 'master'

Operatorless Istio with CORE packages only SKIP UPGRADE DEBUG

Closes #2256

See merge request !4906
parents 3ef346fc 49b82d89
No related branches found
No related tags found
1 merge request!4906Operatorless Istio with CORE packages only SKIP UPGRADE DEBUG
Pipeline #3993615 failed
Showing
with 371 additions and 20 deletions
istioGatewayPublic:
tls:
key: |
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDCkz9rWBxaiDui
uw8vF49lTKtShFTu3tAkWiyp3IwzSH3F/HeSZ8pMTl7reCiRbhXHSmqiCyVVFkg7
eG6gA1fJNhJI26zoTSaN+seV1N4qgQIa4vkVgUEumPo6L+X93n7X7rH1GwVilYFo
5MpYZkGoTLp8JtZRsUAXmooRa2URUoX11Wx4aegPR55gKkhXKnTl5a7cln93zOZb
6QKG/UOmSIJe5C5JKQYhpQlv5DWi7Zf6ZqJABT27Lu8U/DY4qCv4pVphxdcZZqGl
8GbBRmZ3pEHKS9KzlffHRE4xl/xy1cSdG60jlpBL8f8PO+bGEnqCMr8LXJqoU1Lp
Samg9AuJAgMBAAECggEAG8CLzaA6HxGKS/oZPtLB8aVfVDwqrw1Zq62u7CVYW+It
ikUputiR6pNNB5HSW3fTpGKxVd54Gyw77juNr8X6Sekr73dhsJp8csi/mdfMPky7
Q6F2/IG8jcxk+FKnn6+R8POLL1YEzRxc4lyrnbMsDziuapHRhMJezV8N7VEfj7ox
HbZDv00sLdwlIpnG6llJysq+S48s86l8CYBzpTk33XNOwWahrwZBGmpRBwdj2niP
8UVZMD2GPSX+RevWEM5l3TkU6YbaFgOFthXmP3KcQjUHFkPRZq8iEcJnFixcaOGK
ySm3SbRr2kdHzuIpWTm4Yro9/9Jj3y5bfg3uo29jhwKBgQDydCIIeglxVaZgx06x
o7LdZpRQvVp3/Es6K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WYtbt4pgdamlwVeZEW+LM7qZEJEsMNPrfC03APKmZsJgpWCDWOKZvkZcvjV
uYkQ4omYCTX5ohy+knMjdOmdH9c7SpqEWBDC86fiNex+O0XOMEZSa8DA
-----END CERTIFICATE-----
istio:
gateways:
public:
......@@ -271,4 +362,4 @@ addons:
pdWfS6PJ1jty80r2VKsM/Dj3YIDfbjXKdaFU5C+8bhfJGqU3taKauuz0wHVGT3eo
6FlWkWYtbt4pgdamlwVeZEW+LM7qZEJEsMNPrfC03APKmZsJgpWCDWOKZvkZcvjV
uYkQ4omYCTX5ohy+knMjdOmdH9c7SpqEWBDC86fiNex+O0XOMEZSa8DA
-----END CERTIFICATE-----
-----END CERTIFICATE-----
\ No newline at end of file
......@@ -438,4 +438,45 @@ data:
{{- end -}}
{{- end -}}
{{- /* Returns namespace of istio gateways */ -}}
{{- define "istioGatewayNamespace" -}}
{{- if .Values.istio.enabled -}}
{{- print "istio-system" -}}
{{- else -}}
{{- print "istio-gateway" -}}
{{- end -}}
{{- end -}}
{{- /* Returns name of istio public gateway */ -}}
{{- define "istioPublicGateway" -}}
{{- if .Values.istio.enabled -}}
{{- print "public" -}}
{{- else -}}
{{- print "public-ingressgateway" -}}
{{- end -}}
{{- end -}}
{{- /* Returns name of istio passthrough gateway */ -}}
{{- define "istioPassthroughGateway" -}}
{{- if .Values.istio.enabled -}}
{{- print "passthrough" -}}
{{- else -}}
{{- print "passthrough-ingressgateway" -}}
{{- end -}}
{{- end -}}
{{- /* Returns true if either istio or istioCore is enabled */ -}}
{{- define "istioEnabled" -}}
{{ or .Values.istio.enabled .Values.istioCore.enabled }}
{{- end -}}
{{- /* Returns name of istio Namespace Selector*/ -}}
{{- define "istioNamespaceSelector" -}}
{{- if .Values.istioCore.enabled -}}
ingress: istio-gateway
egress: istio-core
{{- else -}}
ingress: istio-controlplane
egress: istio-controlplane
{{- end -}}
{{- end -}}
\ No newline at end of file
......@@ -6,6 +6,6 @@ metadata:
app.kubernetes.io/name: argocd
app.kubernetes.io/component: "core"
{{- include "commonLabels" . | nindent 4}}
istio-injection: {{ ternary "enabled" "disabled" (and .Values.istio.enabled (eq (dig "istio" "injection" "enabled" .Values.addons.argocd) "enabled")) }}
istio-injection: {{ ternary "enabled" "disabled" (and (include "istioEnabled" .) (eq (dig "istio" "injection" "enabled" .Values.addons.argocd) "enabled")) }}
name: argocd
{{- end }}
{{- end }}
\ No newline at end of file
......@@ -142,7 +142,7 @@ repoServer:
{{- end }}
istio:
enabled: {{ .Values.istio.enabled }}
enabled: {{ include "istioEnabled" . }}
hardened:
enabled: {{ or
(dig "istio" "hardened" "enabled" false .Values.addons.argocd.values)
......@@ -151,13 +151,15 @@ istio:
injection: {{ dig "istio" "injection" "enabled" .Values.addons.argocd }}
argocd:
gateways:
- istio-system/{{ default "public" .Values.addons.argocd.ingress.gateway }}
- {{ include "istioGatewayNamespace" . }}/{{ default (include "istioPublicGateway" . ) .Values.addons.argocd.ingress.gateway }}
monitoring:
enabled: {{ .Values.monitoring.enabled }}
networkPolicies:
enabled: {{ .Values.networkPolicies.enabled }}
istioNamespaceSelector:
{{ include "istioNamespaceSelector" . | nindent 4 }}
controlPlaneCidr: {{ .Values.networkPolicies.controlPlaneCidr }}
ingressLabels:
{{- $gateway := default "public" .Values.addons.argocd.ingress.gateway }}
......
{{- if and .Values.istio.enabled (eq .Values.addons.authservice.sourceType "git") (or .Values.addons.authservice.enabled (and .Values.monitoring.enabled .Values.monitoring.sso.enabled) (and .Values.jaeger.enabled .Values.jaeger.sso.enabled) (and .Values.tempo.enabled .Values.tempo.sso.enabled)) }}
{{- if and (include "istioEnabled" .) (eq .Values.addons.authservice.sourceType "git") (or .Values.addons.authservice.enabled (and .Values.monitoring.enabled .Values.monitoring.sso.enabled) (and .Values.jaeger.enabled .Values.jaeger.sso.enabled) (and .Values.tempo.enabled .Values.tempo.sso.enabled)) }}
{{- $gitCredsDict := dict
"name" "authservice"
"packageGitScope" .Values.addons.authservice.git
......
{{- $fluxSettingsAuthservice := merge .Values.addons.authservice.flux .Values.flux -}}
{{- if and .Values.istio.enabled (or .Values.addons.authservice.enabled (and .Values.monitoring.enabled .Values.monitoring.sso.enabled) (and .Values.jaeger.enabled .Values.jaeger.sso.enabled) (and .Values.tempo.enabled .Values.tempo.sso.enabled)) }}
{{- if and (include "istioEnabled" .) (or .Values.addons.authservice.enabled (and .Values.monitoring.enabled .Values.monitoring.sso.enabled) (and .Values.jaeger.enabled .Values.jaeger.sso.enabled) (and .Values.tempo.enabled .Values.tempo.sso.enabled)) }}
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
......@@ -65,4 +65,8 @@ spec:
- name: monitoring
namespace: {{ .Release.Namespace }}
{{- end }}
{{- if .Values.istioCore.enabled }}
- name: istio-core
namespace: {{ .Release.Namespace }}
{{- end }}
{{- end }}
{{- if and .Values.istio.enabled (or .Values.addons.authservice.enabled (and .Values.monitoring.enabled .Values.monitoring.sso.enabled) (and .Values.jaeger.enabled .Values.jaeger.sso.enabled) (and .Values.tempo.enabled .Values.tempo.sso.enabled)) }}
{{- if and (include "istioEnabled" .) (or .Values.addons.authservice.enabled (and .Values.monitoring.enabled .Values.monitoring.sso.enabled) (and .Values.jaeger.enabled .Values.jaeger.sso.enabled) (and .Values.tempo.enabled .Values.tempo.sso.enabled)) }}
{{- if ( include "imagePullSecret" . ) }}
apiVersion: v1
kind: Secret
......
{{- if and .Values.istio.enabled (or .Values.addons.authservice.enabled (and .Values.monitoring.enabled .Values.monitoring.sso.enabled) (and .Values.jaeger.enabled .Values.jaeger.sso.enabled) (and .Values.tempo.enabled .Values.tempo.sso.enabled)) }}
{{- if and (include "istioEnabled" .) (or .Values.addons.authservice.enabled (and .Values.monitoring.enabled .Values.monitoring.sso.enabled) (and .Values.jaeger.enabled .Values.jaeger.sso.enabled) (and .Values.tempo.enabled .Values.tempo.sso.enabled)) }}
apiVersion: v1
kind: Namespace
metadata:
name: authservice
labels:
istio-injection: {{ ternary "enabled" "disabled" (and .Values.istio.enabled (eq (dig "istio" "injection" "enabled" .Values.addons.authservice) "enabled")) }}
istio-injection: {{ ternary "enabled" "disabled" (and (include "istioEnabled" .) (eq (dig "istio" "injection" "enabled" .Values.addons.authservice) "enabled")) }}
app.kubernetes.io/name: authservice
app.kubernetes.io/component: "core"
{{- include "commonLabels" . | nindent 4}}
......
{{- if and .Values.istio.enabled (or .Values.addons.authservice.enabled (and .Values.monitoring.enabled .Values.monitoring.sso.enabled) (and .Values.jaeger.enabled .Values.jaeger.sso.enabled) (and .Values.tempo.enabled .Values.tempo.sso.enabled) (and .Values.addons.thanos.enabled .Values.addons.thanos.sso.enabled) (and .Values.addons.holocron.enabled .Values.addons.holocron.sso.enabled)) }}
{{- if and (include "istioEnabled" .) (or .Values.addons.authservice.enabled (and .Values.monitoring.enabled .Values.monitoring.sso.enabled) (and .Values.jaeger.enabled .Values.jaeger.sso.enabled) (and .Values.tempo.enabled .Values.tempo.sso.enabled) (and .Values.addons.thanos.enabled .Values.addons.thanos.sso.enabled) (and .Values.addons.holocron.enabled .Values.addons.holocron.sso.enabled)) }}
{{- include "values-secret" (dict "root" $ "package" .Values.addons.authservice "name" "authservice" "defaults" (include "bigbang.defaults.authservice" .)) }}
{{- end }}
......@@ -16,7 +16,7 @@
}}
istio:
enabled: {{ .Values.istio.enabled | default false }}
enabled: {{ (include "istioEnabled" .) | default false }}
hardened:
enabled: {{ $authServiceHardened }}
clusterWideHardenedEnabled: {{ dig "hardened" "enabled" false .Values.istio.values }}
......@@ -37,6 +37,8 @@ monitoring:
networkPolicies:
enabled: {{ .Values.networkPolicies.enabled | default false }}
istioNamespaceSelector:
{{ include "istioNamespaceSelector" . | nindent 4 }}
ingressLabels:
{{- $gateway := default "public" .Values.addons.haproxy.ingress.gateway }}
{{- $default := dict "app" (dig "gateways" $gateway "ingressGateway" nil .Values.istio) "istio" nil }}
......@@ -63,7 +65,7 @@ redis-bb:
selector:
app.kubernetes.io/name: redis-bb
app.kubernetes.io/instance: authservice-authservice
{{- if and .Values.istio.enabled (eq (dig "istio" "mtls" "mode" "STRICT" .Values.addons.authservice.values) "STRICT") }}
{{- if and (include "istioEnabled" .) (eq (dig "istio" "mtls" "mode" "STRICT" .Values.addons.authservice.values) "STRICT") }}
scheme: https
tlsConfig:
caFile: /etc/prom-certs/root-cert.pem
......
......@@ -58,12 +58,16 @@ spec:
valuesKey: "overlays"
# TODO: DRY this up
{{- if or .Values.gatekeeper.enabled .Values.istio.enabled .Values.kyvernoPolicies.enabled .Values.monitoring.enabled }}
{{- if or .Values.gatekeeper.enabled (include "istioEnabled" .) .Values.kyvernoPolicies.enabled .Values.monitoring.enabled }}
dependsOn:
{{- if .Values.istio.enabled }}
- name: istio
namespace: {{ .Release.Namespace }}
{{- end }}
{{- if .Values.istioCore.enabled }}
- name: istio-core
namespace: {{ .Release.Namespace }}
{{- end }}
{{- if .Values.gatekeeper.enabled }}
- name: gatekeeper
namespace: {{ .Release.Namespace }}
......
......@@ -7,6 +7,5 @@ metadata:
app.kubernetes.io/name: monitoring
app.kubernetes.io/component: "core"
{{- include "commonLabels" . | nindent 4}}
istio-injection: {{ ternary "enabled" "disabled" (and .Values.istio.enabled (eq (dig "istio" "injection" "enabled" .Values.grafana) "enabled")) }}
istio-injection: {{ ternary "enabled" "disabled" (and (include "istioEnabled" .) (eq (dig "istio" "injection" "enabled" .Values.grafana) "enabled")) }}
{{- end }}
......@@ -8,7 +8,7 @@
hostname: {{ $domainName }}
domain: {{ $domainName }}
{{- $istioInjection := (and (eq (dig "istio" "injection" "enabled" .Values.grafana) "enabled") .Values.istio.enabled) }}
{{- $istioInjection := (and (include "istioEnabled" .) (eq (dig "istio" "injection" "enabled" .Values.grafana) "enabled")) }}
{{- $gitlabRedis := (and (ne .Values.addons.gitlab.redis.password "" ) (or .Values.addons.gitlab.enabled .Values.addons.gitlabRunner.enabled)) }}
{{- $authserviceRedisEnabled := (and (dig "values" "redis" "enabled" false .Values.addons.authservice) .Values.addons.authservice.enabled) }}
{{- $redisDatasource := (or $gitlabRedis .Values.addons.argocd.enabled $authserviceRedisEnabled) }}
......@@ -18,6 +18,8 @@ flux:
networkPolicies:
enabled: {{ .Values.networkPolicies.enabled }}
istioNamespaceSelector:
{{ include "istioNamespaceSelector" . | nindent 4 }}
controlPlaneCidr: {{ .Values.networkPolicies.controlPlaneCidr }}
ingressLabels:
{{- $gateway := default "public" .Values.grafana.ingress.gateway }}
......@@ -34,7 +36,7 @@ gitlabRunner:
istio:
{{- $grafanaInjection := dig "istio" "injection" "enabled" .Values.grafana }}
enabled: {{ .Values.istio.enabled }}
enabled: {{ include "istioEnabled" . }}
hardened:
enabled: {{ or
(dig "istio" "hardened" "enabled" false .Values.monitoring.values)
......@@ -48,7 +50,7 @@ istio:
grafana:
enabled: true
gateways:
- istio-system/{{ default "public" .Values.grafana.ingress.gateway }}
- {{ include "istioGatewayNamespace" . }}/{{ default (include "istioPublicGateway" . ) .Values.grafana.ingress.gateway }}
injection: {{ dig "istio" "injection" "enabled" .Values.grafana }}
anchore:
......@@ -237,7 +239,7 @@ datasources:
{{- end }}
grafana.ini:
{{- if .Values.istio.enabled }}
{{- if include "istioEnabled" . }}
server:
root_url: https://grafana.{{ $domainName }}/
{{- end }}
......
{{- $gitCredsSecretDict := dict
"name" "istioCore"
"targetScope" .Values.istioCore
"releaseName" .Release.Name
"releaseNamespace" .Release.Namespace
}}
{{- include "gitCredsSecret" $gitCredsSecretDict | nindent 0 -}}
{{- if and (eq .Values.istioCore.sourceType "git") (not .Values.offline) .Values.istioCore.enabled }}
{{- $gitCredsDict := dict
"name" "istioCore"
"packageGitScope" .Values.istioCore.git
"rootScope" .
"releaseName" .Release.Name
}}
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: istio-core
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: istio-core
app.kubernetes.io/component: "core"
{{- include "commonLabels" . | nindent 4}}
spec:
interval: {{ .Values.flux.interval }}
url: {{ .Values.istioCore.git.repo }}
ref:
{{- include "validRef" .Values.istioCore.git | nindent 4 }}
{{ include "gitIgnore" . }}
{{- include "gitCredsExtended" $gitCredsDict | nindent 2 }}
{{- end }}
{{- $fluxSettingsIstioCore := merge .Values.istioCore.flux .Values.flux -}}
{{- if and .Values.istioCore.enabled }}
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: istio-core
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: istio-core
app.kubernetes.io/component: "core"
{{- include "commonLabels" . | nindent 4}}
annotations:
checksum/bigbang-values: {{ include (print $.Template.BasePath "/istio-core/values.yaml") . | sha256sum }}
spec:
targetNamespace: istio-system
chart:
spec:
{{- if eq .Values.istioCore.sourceType "git" }}
chart: {{ .Values.istioCore.git.path }}
sourceRef:
kind: GitRepository
name: istio-core
namespace: {{ .Release.Namespace }}
{{- else }}
chart: {{ .Values.istioCore.helmRepo.chartName }}
version: {{ .Values.istioCore.helmRepo.tag }}
sourceRef:
kind: HelmRepository
name: {{ .Values.istioCore.helmRepo.repoName }}
namespace: {{ .Release.Namespace }}
{{- $repoType := include "getRepoType" (dict "repoName" .Values.istioCore.helmRepo.repoName "allRepos" $.Values.helmRepositories) -}}
{{- if (and .Values.istioCore.helmRepo.cosignVerify (eq $repoType "oci")) }} # Needs to be an OCI repo
verify:
provider: cosign
secretRef:
name: {{ printf "%s-cosign-pub" .Values.istioCore.helmRepo.repoName }}
{{- end }}
{{- end }}
interval: 5m
{{- toYaml $fluxSettingsIstioCore | nindent 2 }}
{{- if .Values.istioCore.postRenderers }}
postRenderers:
{{ toYaml .Values.istioCore.postRenderers | nindent 4 }}
{{- end }}
valuesFrom:
- name: {{ .Release.Name }}-istio-core-values
kind: Secret
valuesKey: "common"
- name: {{ .Release.Name }}-istio-core-values
kind: Secret
valuesKey: "defaults"
- name: {{ .Release.Name }}-istio-core-values
kind: Secret
valuesKey: "overlays"
{{- if or .Values.gatekeeper.enabled .Values.kyvernoPolicies.enabled }}
dependsOn:
{{- if .Values.gatekeeper.enabled }}
- name: gatekeeper
namespace: {{ .Release.Namespace }}
{{- end }}
{{- if .Values.kyvernoPolicies.enabled }}
- name: kyverno-policies
namespace: {{ .Release.Namespace }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.istioCore.enabled }}
{{- if ( include "imagePullSecret" . ) }}
apiVersion: v1
kind: Secret
metadata:
name: private-registry
namespace: istio-system
labels:
app.kubernetes.io/name: istio-core
app.kubernetes.io/component: "core"
{{- include "commonLabels" . | nindent 4}}
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: {{ template "imagePullSecret" . }}
{{- end }}
{{- end }}
\ No newline at end of file
{{- if .Values.istioCore.enabled }}
apiVersion: v1
kind: Namespace
metadata:
name: istio-system
labels:
istio-base-managed: Reconcile
istio-injection: disabled
app.kubernetes.io/name: istio-core
app.kubernetes.io/component: "core"
{{- include "commonLabels" . | nindent 4}}
{{- if or .Values.istioGatewayPublic.enabled .Values.istioGatewayPassthrough.enabled }}
---
apiVersion: v1
kind: Namespace
metadata:
name: istio-gateway
labels:
istio-gateway-managed: Reconcile
istio-injection: enabled
app.kubernetes.io/name: istio-gateway
app.kubernetes.io/component: "core"
{{- include "commonLabels" . | nindent 4}}
{{- end }}
{{- end }}
{{- $pkg := "istioCore" }}
{{- /* Create secret */ -}}
{{- if (get .Values $pkg).enabled }}
{{- include "values-secret" (dict "root" $ "package" (get .Values $pkg) "name" ($pkg | kebabcase) "defaults" (include (printf "bigbang.defaults.%s" $pkg | kebabcase) .)) }}
{{- end }}
{{- define "bigbang.defaults.istio-core" -}}
createNamespace: true
enterprise: {{ .Values.istioCore.enterprise }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
imagePullSecrets:
- private-registry
istiod:
networkPolicies:
enabled: {{ .Values.networkPolicies.enabled }}
controlPlaneCidr: {{ .Values.networkPolicies.controlPlaneCidr }}
monitoring:
enabled: {{ .Values.monitoring.enabled }}
{{- if .Values.addons.authservice.enabled }}
meshConfig:
extensionProviders:
- name: "authservice"
envoyExtAuthzGrpc:
service: "authservice.authservice.svc.cluster.local"
port: "10003"
{{- end }}
{{- end }}
{{- $gitCredsSecretDict := dict
"name" "istioGatewayPassthrough"
"targetScope" .Values.istioGatewayPassthrough
"releaseName" .Release.Name
"releaseNamespace" .Release.Namespace
}}
{{- include "gitCredsSecret" $gitCredsSecretDict | nindent 0 -}}
{{- if and (eq .Values.istioGatewayPassthrough.sourceType "git") (not .Values.offline) .Values.istioGatewayPassthrough.enabled }}
{{- $gitCredsDict := dict
"name" "istioGatewayPassthrough"
"packageGitScope" .Values.istioGatewayPassthrough.git
"rootScope" .
"releaseName" .Release.Name
}}
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: istio-gateway-passthrough
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: istio-gateway-passthrough
app.kubernetes.io/component: "core"
{{- include "commonLabels" . | nindent 4}}
spec:
interval: {{ .Values.flux.interval }}
url: {{ .Values.istioGatewayPassthrough.git.repo }}
ref:
{{- include "validRef" .Values.istioGatewayPassthrough.git | nindent 4 }}
{{ include "gitIgnore" . }}
{{- include "gitCredsExtended" $gitCredsDict | nindent 2 }}
{{- end }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment