Skip to content

Commit e906b41

Browse files
committed
Merge remote-tracking branch 'upstream/main' into main
2 parents f0d8cf0 + 8defced commit e906b41

File tree

14 files changed

+231
-103
lines changed

14 files changed

+231
-103
lines changed

charts/Makefile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ helmfile-lint: .check-helmfile-installed helmfile.yaml ## Lints the helmfile
2727
.helmfile-local-post-install: ## Post install steps for local helmfile deployment
2828
@$(MAKE) -s configure-local-hosts
2929
@echo "";
30-
@echo "Cluster has been deployed locally: http://$(MACHINE_FQDN)";
30+
@echo "Cluster has been deployed locally: https://$(MACHINE_FQDN)";
3131
@echo " For secure connections self-signed certificates are used.";
32-
@echo "
32+
@echo "";
3333

3434
.PHONY: helmfile-apply
3535
helmfile-apply: .check-helmfile-installed helmfile.yaml ## Applies the helmfile configuration
@@ -41,7 +41,7 @@ helmfile-apply: .check-helmfile-installed helmfile.yaml ## Applies the helmfile
4141
fi
4242

4343
.PHONY: helmfile-sync
44-
helmfile-sync: .check-helmfile-installed helmfile.yaml ## Syncs the helmfile configuration
44+
helmfile-sync: .check-helmfile-installed helmfile.yaml ## Syncs the helmfile configuration (use `helmfile-apply` to deploy the app)
4545
set -a; source $(REPO_CONFIG_LOCATION); set +a; \
4646
helmfile -f $(REPO_BASE_DIR)/charts/helmfile.yaml sync
4747

@@ -64,3 +64,10 @@ helmfile-diff: .check-helmfile-installed helmfile.yaml ## Shows the differences
6464
helmfile-delete: .check-helmfile-installed helmfile.yaml ## Deletes the helmfile configuration
6565
@set -a; source $(REPO_CONFIG_LOCATION); set +a; \
6666
helmfile -f $(REPO_BASE_DIR)/charts/helmfile.yaml delete
67+
68+
.PHONY: up
69+
up: helmfile-apply ## Start the stack
70+
71+
.PHONY: leave
72+
leave: ## Leaves kind cluster
73+
kind delete clusters kind

charts/adminer/values.yaml.gotmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ ingress:
4949
enabled: true
5050
className: ""
5151
annotations:
52+
namespace: {{ .Release.Namespace }}
5253
cert-manager.io/cluster-issuer: "cert-issuer"
5354
traefik.ingress.kubernetes.io/router.entrypoints: websecure
5455
tls:

charts/cert-manager/values.selfsigned.yaml.gotmpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ extraObjects:
2222
"helm.sh/hook": post-install,post-upgrade
2323
"helm.sh/hook-weight": "1"
2424
spec:
25+
secretTemplate:
26+
annotations:
27+
reflector.v1.k8s.emberstack.com/reflection-allowed: "true"
28+
reflector.v1.k8s.emberstack.com/reflection-allowed-namespaces: "" # Control destination namespaces: emptystring means all
29+
reflector.v1.k8s.emberstack.com/reflection-auto-enabled: "true" # Auto create reflection for matching namespaces
30+
reflector.v1.k8s.emberstack.com/reflection-auto-namespaces: "" # Control auto-reflection namespaces
2531
isCA: true
2632
commonName: local-ca
2733
subject:
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Default values for adminer.
2+
# This is a YAML-formatted file.
3+
# Declare variables to be passed into your templates.
4+
5+
replicaCount: 1
6+
7+
image:
8+
repository: portainer/portainer-ce
9+
pullPolicy: IfNotPresent
10+
11+
imagePullSecrets: []
12+
nameOverride: ""
13+
fullnameOverride: ""
14+
15+
serviceAccount:
16+
# Annotations to add to the service account
17+
annotations: {}
18+
# The name of the service account to use.
19+
# If not set and create is true, a name is generated using the fullname template
20+
name: portainer-sa-clusteradmin
21+
22+
podAnnotations: {}
23+
podLabels: {}
24+
25+
podSecurityContext:
26+
{}
27+
28+
securityContext:
29+
{}
30+
31+
service:
32+
type: "ClusterIP"
33+
port: 9000
34+
35+
ingress:
36+
enabled: true
37+
className: ""
38+
annotations:
39+
namespace: {{ .Release.Namespace }}
40+
cert-manager.io/cluster-issuer: "cert-issuer"
41+
traefik.ingress.kubernetes.io/router.entrypoints: websecure
42+
traefik.ingress.kubernetes.io/router.middlewares: traefik-traefik-basic-auth@kubernetescrd,traefik-portainer-strip-prefix@kubernetescrd # namespace + middleware name
43+
tls:
44+
- hosts:
45+
- {{ requiredEnv "K8S_MONITORING_FQDN" }}
46+
secretName: monitoring-tls
47+
hosts:
48+
- host: {{ requiredEnv "K8S_MONITORING_FQDN" }}
49+
paths:
50+
- path: /portainer
51+
pathType: Prefix
52+
backend:
53+
service:
54+
name: portainer
55+
port:
56+
number: 9000
57+
58+
59+
resources:
60+
limits:
61+
cpu: 2
62+
memory: 1024Mi
63+
requests:
64+
cpu: 0.1
65+
memory: 128Mi
66+
67+
nodeSelector:
68+
ops: "true"

charts/traefik/values.insecure.yaml.gotmpl

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ extraObjects:
33
kind: Service
44
metadata:
55
name: traefik-api
6+
namespace: {{.Release.Namespace}}
67
spec:
78
type: ClusterIP
89
selector:
910
app.kubernetes.io/name: traefik
10-
app.kubernetes.io/instance: traefik-default
11+
app.kubernetes.io/instance: {{.Release.Namespace}}-traefik
1112
ports:
1213
- port: 8080
1314
name: traefik
@@ -17,7 +18,7 @@ extraObjects:
1718
kind: Secret
1819
metadata:
1920
name: traefik-authorized-users
20-
namespace: default
21+
namespace: {{.Release.Namespace}}
2122
data:
2223
users: |2
2324
{{ requiredEnv "TRAEFIK_K8S_AUTHORIZED_USER" }}
@@ -28,20 +29,31 @@ extraObjects:
2829
spec:
2930
basicAuth:
3031
secret: traefik-authorized-users # https://doc.traefik.io/traefik/middlewares/http/basicauth/#users
32+
- apiVersion: traefik.io/v1alpha1
33+
kind: Middleware
34+
metadata:
35+
name: portainer-strip-prefix
36+
namespace: {{.Release.Namespace}}
37+
spec:
38+
stripPrefix:
39+
prefixes:
40+
- /portainer
3141
- apiVersion: networking.k8s.io/v1
3242
kind: Ingress
3343
metadata:
3444
name: traefik-dashboard
45+
namespace: {{.Release.Namespace}}
3546
annotations:
3647
traefik.ingress.kubernetes.io/router.entrypoints: web,websecure # allow http(s) for local deployment
37-
traefik.ingress.kubernetes.io/router.middlewares: default-traefik-basic-auth@kubernetescrd # namespace + middleware name
48+
traefik.ingress.kubernetes.io/router.middlewares: {{.Release.Namespace}}-traefik-basic-auth@kubernetescrd # namespace + middleware name
49+
cert-manager.io/cluster-issuer: "cert-issuer"
3850
spec:
3951
tls:
40-
- hosts:
41-
- k8s.monitoring.{{ requiredEnv "MACHINE_FQDN" }}
42-
secretName: monitoring-tls
52+
- hosts:
53+
- {{ requiredEnv "K8S_MONITORING_FQDN" }}
54+
secretName: monitoring-tls
4355
rules:
44-
- host: k8s.monitoring.{{ requiredEnv "MACHINE_FQDN" }}
56+
- host: {{ requiredEnv "K8S_MONITORING_FQDN" }}
4557
http:
4658
paths:
4759
- path: /dashboard
@@ -51,7 +63,7 @@ extraObjects:
5163
name: traefik-api
5264
port:
5365
name: traefik
54-
- host: k8s.monitoring.{{ requiredEnv "MACHINE_FQDN" }}
66+
- host: {{ requiredEnv "K8S_MONITORING_FQDN" }}
5567
http:
5668
paths:
5769
- path: /api

charts/traefik/values.secure.yaml.gotmpl

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ extraObjects:
1010
kind: Service
1111
metadata:
1212
name: traefik-api
13+
namespace: {{.Release.Namespace}}
1314
spec:
1415
type: ClusterIP
1516
selector:
1617
app.kubernetes.io/name: traefik
17-
app.kubernetes.io/instance: traefik-default
18+
app.kubernetes.io/instance: {{.Release.Namespace}}-traefik
1819
ports:
1920
- port: 8080
2021
name: traefik
@@ -25,7 +26,7 @@ extraObjects:
2526
kind: Secret
2627
metadata:
2728
name: traefik-authorized-users
28-
namespace: default
29+
namespace: {{.Release.Namespace}}
2930
data:
3031
users: |2
3132
{{ requiredEnv "TRAEFIK_K8S_AUTHORIZED_USER" }}
@@ -34,10 +35,19 @@ extraObjects:
3435
kind: Middleware
3536
metadata:
3637
name: traefik-basic-auth
38+
namespace: {{.Release.Namespace}}
3739
spec:
3840
basicAuth:
3941
secret: traefik-authorized-users # https://doc.traefik.io/traefik/middlewares/http/basicauth/#users
40-
42+
- apiVersion: traefik.io/v1alpha1
43+
kind: Middleware
44+
metadata:
45+
name: portainer-strip-prefix
46+
namespace: {{.Release.Namespace}}
47+
spec:
48+
stripPrefix:
49+
prefixes:
50+
- /portainer
4151
- apiVersion: traefik.io/v1alpha1
4252
kind: Middleware
4353
metadata:
@@ -53,9 +63,11 @@ extraObjects:
5363
kind: Ingress
5464
metadata:
5565
name: traefik-dashboard
66+
namespace: {{.Release.Namespace}}
5667
annotations:
5768
traefik.ingress.kubernetes.io/router.entrypoints: websecure
58-
traefik.ingress.kubernetes.io/router.middlewares: default-traefik-basic-auth@kubernetescrd
69+
traefik.ingress.kubernetes.io/router.middlewares: {{.Release.Namespace}}-traefik-basic-auth@kubernetescrd # namespace + middleware name
70+
cert-manager.io/cluster-issuer: "cert-issuer"
5971
spec:
6072
tls:
6173
- hosts:

charts/traefik/values.webinternal.yaml.gotmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ ports:
99
http3:
1010
enabled: false
1111
middlewares:
12-
- default-internal-ipallowlist@kubernetescrd
12+
- {{.Release.Namespace}}-internal-ipallowlist@kubernetescrd

scripts/kind_config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ nodes:
1010
hostPort: 443
1111
- containerPort: 32443
1212
hostPort: 8443 ## handle traefik [interal] http --> https redirect
13+
labels:
14+
ops: "true"
15+
simcore: "true"

0 commit comments

Comments
 (0)