Skip to content

Commit c8e98a2

Browse files
committed
moving to helm-gateway chart
1 parent 7e4aa71 commit c8e98a2

File tree

17 files changed

+110
-65
lines changed

17 files changed

+110
-65
lines changed

Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
2+
# lint the clusters list for duplicate values
13
lint:
4+
# specifically the "name" "friendlyName" and "subdomain" keys (with support for appending more fields) in ./clusters/*.yaml
25
./scripts/lint_cluster_yaml.py "./clusters/*.yaml" name friendlyName subdomain

README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
TODO:
44

5-
- add a makefile to lint cluster values for duplicates (cluster name / server / etc)
5+
- add charts to remote git-ignore for future deletion
6+
- update namespace for `gateway` on GKE to "work" (or mirror istio setup? Maybe rewire istio for more standard approach...)
7+
- move httproutes to respective workloads
68
- improve workload selection / declaration + helm values (https://github.com/argoproj/argo-cd/issues/11982 - allow selector + nested helm workload values )
79
- add gatekeeper locks to workload definitions
810
- create secrets rotation / creation tooling
911
- update external secrets to use helm values (simplify setup): https://external-secrets.io/v0.7.0/api/secretstore/
1012
- Document the service accounts used in GCP / dns a bit better (gcloud iam service-accounts create cloudydemo-dns01-solver + GCP GSM)
11-
- Move any/all CRDs to a [separate ApplicationSet](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/#install-a-crd-declaration-before-using-the-resource)
13+
- Move any/all CRDs to a <0 sync wave (if needed, create 2 sources)
1214
- Warn and fix any gotemplates with no value (using defaults)
1315
- Use sync waves at the Application and ApplicationSet level to order (like Gateway after Istio)
1416
- Move certmanager secret to git (`kubectl -n cert-manager create secret generic clouddns-dns01-solver-svc-acct --from-file=$HOME/key.json`)
@@ -23,6 +25,7 @@ TODO:
2325
- add linting to check for matching selectors before applying
2426
- move `environments` config for appset into "config" directory and update kube-prometheus-stack
2527
- create a centralized override yaml for version upgrades (like argocd not changed in 2 places)
28+
- rename or append 01, 02 to high priority workloads / sync wave (like argoCD -> secrets -> istio -> gateway -> certs etc)
2629

2730
## Workload breakdown
2831

clusters/argocd-us-tx-local-gpu-box.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ workloads:
2020
echo-server: deployed
2121
gateway-api-crds: deployed
2222
# like ingress, this is the north south ingress "Gateway API" gateway
23-
gateway-api-istio-ingress: deployed
23+
gateway-north-south: deployed
2424
certmanager: deployed
25-
istio: deployed
25+
oss-istio: deployed
2626
metrics-server: deployed
2727
external-secrets-operator: deployed
2828
gatekeeper: deployed

workloads/gateway-api-istio-ingress/applicationset/gateway-api-istio-ingress.yaml

-47
This file was deleted.

workloads/gateway-api-istio-ingress/config/base/kustomization.yaml

-7
This file was deleted.

workloads/gateway-api-istio-ingress/config/overlays/baremetal/argocd-http-routes.yaml

Whitespace-only changes.

workloads/gateway-api-istio-ingress/README.md workloads/gateway-north-south/README.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
The central point of traffic ingress / egress
22

3-
TODO: chunk out domain naming better (automatic per cluster, with cert manager, etc)
3+
## Test
44

5-
## I think not needed with k8s gateway api
5+
```
6+
kustomize build workloads/gateway-north-south/config/overlays/baremetal --enable-helm
67
7-
k8s gateway api creates the resource and stuff...
8+
or
89
9-
This directory contains all gateway related objects (today for Istio)
10+
kubectl kustomize workloads/gateway-north-south/config/overlays/baremetal --enable-helm
11+
```
1012

13+
## DELETE BELOW:
1114

1215
```
1316
# from: https://istio.io/latest/docs/setup/additional-setup/getting-started/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: ApplicationSet
3+
metadata:
4+
name: gateway-north-south
5+
namespace: argocd
6+
spec:
7+
goTemplate: true
8+
generators:
9+
- git:
10+
files:
11+
- path: clusters/*.yaml
12+
repoURL: "https://github.com/jimangel/cd.git"
13+
revision: HEAD
14+
selector:
15+
matchLabels:
16+
workloads.gateway-north-south: "deployed"
17+
template:
18+
metadata:
19+
name: 'gateway-north-south-{{ if eq .cluster.name "in-cluster" }}local{{ else }}{{ .cluster.friendlyName }}{{ end }}'
20+
labels:
21+
workloadType: networking
22+
environment: "{{ .themes.environment }}"
23+
provider: "{{ .themes.provider }}"
24+
# how is this workload deployed in argocd?
25+
syncType: "kustomize-nested-helm-remote"
26+
# for quick ref
27+
cluster: "{{ .cluster.friendlyName }}"
28+
finalizers:
29+
- "resources-finalizer.argocd.argoproj.io"
30+
spec:
31+
project: default
32+
sources:
33+
- chart: out-of-pocket-cloudlab/helm-charts/unofficial-gateway-api
34+
repoURL: us-central1-docker.pkg.dev
35+
targetRevision: 0.1.1
36+
helm:
37+
values: |
38+
gateway:
39+
enabled: true
40+
class: "istio"
41+
annotations: {}
42+
addresses:
43+
- type: Hostname
44+
value: "north-south-gateway.istio-gateway.svc.cluster.local"
45+
listeners:
46+
- name: http
47+
protocol: HTTP
48+
port: 80
49+
hostname: '*.gpu-local.cloudydemo.com'
50+
allowedRoutes:
51+
kinds:
52+
- kind: HTTPRoute
53+
namespaces:
54+
from: All
55+
- name: https
56+
protocol: HTTPS
57+
port: 443
58+
hostname: '*.gpu-local.cloudydemo.com'
59+
tls:
60+
mode: Terminate
61+
certificateRefs:
62+
- name: gateway-http-https-wildcard-cert
63+
allowedRoutes:
64+
kinds:
65+
- kind: HTTPRoute
66+
namespaces:
67+
from: All
68+
destination:
69+
name: '{{ .cluster.name }}'
70+
namespace: 'istio-gateway'
71+
syncPolicy:
72+
automated: {}
73+
managedNamespaceMetadata:
74+
# kubectl label namespace default istio-injection=enabled
75+
labels:
76+
istio-injection: enabled
77+
syncOptions:
78+
- CreateNamespace=true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
namespace: gateway

workloads/gateway-api-istio-ingress/config/overlays/baremetal/kustomization.yaml workloads/gateway-north-south/config/overlays/baremetal/kustomization.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
namespace: istio-gateway
22

3+
helmCharts:
4+
- name: gateway
5+
version: 1.19.2
6+
repo: https://istio-release.storage.googleapis.com/charts
7+
releaseName: north-south-gateway
8+
39
resources:
410
- ../../base
511
- gateway.yaml

workloads/istio/README.md workloads/oss-istio/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ kubectl -n istio-system kustomize --enable-helm .
3939
## Run locally
4040

4141
```
42-
kustomize build --enable-helm workloads/istio/config/kustomized-helm/
42+
kustomize build --enable-helm workloads/oss-istio/config/overlays/staging
4343
4444
4545
ignoreDifferences:

workloads/istio/applicationset/istio.yaml workloads/oss-istio/applicationset/istio.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ spec:
1616
revision: HEAD
1717
selector:
1818
matchLabels:
19-
workloads.istio: "deployed"
19+
workloads.oss-istio: "deployed"
2020
template:
2121
metadata:
2222
name: 'istiod-{{ if eq .cluster.name "in-cluster" }}local{{ else }}{{ .cluster.friendlyName }}{{ end }}'
@@ -35,7 +35,7 @@ spec:
3535
# using a kustomized helm chart to include env var for gateway api
3636
- repoURL: https://github.com/jimangel/cd.git
3737
targetRevision: HEAD
38-
path: workloads/istio/config/overlays/{{ .themes.environment }}
38+
path: workloads/oss-istio/config/overlays/{{ .themes.environment }}
3939
kustomize:
4040
patches:
4141
- target:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
resources:
2+
- ../../base

0 commit comments

Comments
 (0)