Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: migrate GCP account and update cluster #28

Merged
merged 64 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from 63 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
4e424a8
add gcp infra for remote-state and user access
agaudreault Feb 22, 2024
61d44a2
add gke and networking
agaudreault Feb 22, 2024
2241150
update cert-manager
agaudreault Feb 22, 2024
23844a5
update ingress to use ingressClassName
agaudreault Feb 22, 2024
fc5d325
kustomize fix
agaudreault Feb 22, 2024
1b7b10d
add dns and external-dns
agaudreault Feb 23, 2024
67b7702
info logs
agaudreault Feb 23, 2024
1ab8075
add external-dns to argo
agaudreault Feb 23, 2024
c8f0f81
fix Jenkins sync
agaudreault Feb 23, 2024
699f93d
update jenkins to v2
agaudreault Feb 23, 2024
3b0846d
update cert-manager resources
agaudreault Feb 23, 2024
926aec1
missing one
agaudreault Feb 23, 2024
d4d452f
update prometheus
agaudreault Feb 23, 2024
91fe246
update upstream
agaudreault Feb 23, 2024
7e8242b
fix prometheus sync crds
agaudreault Feb 23, 2024
746e47a
update istio
agaudreault Feb 23, 2024
73ca49d
fix governor
agaudreault Feb 23, 2024
e870b12
fix cert-manager
agaudreault Feb 23, 2024
97ca9ae
update rollout
agaudreault Feb 23, 2024
8f6f1f7
fix ingress and use less resources
agaudreault Feb 23, 2024
ac7a53d
remove Jenkins
agaudreault Feb 23, 2024
ad21bd8
update governor image
agaudreault Feb 23, 2024
ee1eef9
refactor argo-events
agaudreault Feb 23, 2024
448c8e6
update dex to newer version
agaudreault Feb 23, 2024
dfb57d6
fix cert-manager wrong namespace
agaudreault Feb 26, 2024
295a1b4
prometheus deployment doc
agaudreault Feb 26, 2024
2c56a52
update issuer email
agaudreault Feb 26, 2024
b3fd23a
add dex config
agaudreault Feb 26, 2024
f94a408
dex docs
agaudreault Feb 26, 2024
4197a5a
dns setup
agaudreault Feb 26, 2024
03798b3
fix image name for governor
agaudreault Feb 27, 2024
1e433cf
add argocd auth secret
agaudreault Feb 27, 2024
2ecfdda
update argo base
agaudreault Feb 27, 2024
b017875
revert secret in app
agaudreault Feb 27, 2024
ca02e3b
argocd rbac as code
agaudreault Feb 27, 2024
a810b49
fix argo dex config
agaudreault Feb 27, 2024
faac60a
add external-dns app
agaudreault Feb 27, 2024
603f429
remove dns logging
agaudreault Feb 27, 2024
4f18dcc
add codeowners
agaudreault Feb 27, 2024
b04b083
Merge branch 'master' into add-gcp-infra
agaudreault Feb 27, 2024
dca9c41
add docs about workflow secrets
agaudreault Feb 29, 2024
c94542d
dex HA-er
agaudreault Feb 29, 2024
e67aa0d
add service account token for workflow
agaudreault Feb 29, 2024
fcf4647
fix kustomize for workflow
agaudreault Feb 29, 2024
0726ec6
dex would need a shared state to be HA
agaudreault Feb 29, 2024
f284089
add missing default token for workflows rbac
agaudreault Feb 29, 2024
865077b
typo
agaudreault Feb 29, 2024
586429c
use another sa as default login
agaudreault Feb 29, 2024
bb7d9f4
workflow: add real read-only role
agaudreault Feb 29, 2024
bc03601
split workflows in 2 folder to make it easier to follow
agaudreault Mar 1, 2024
ada757b
use proper namespace
agaudreault Mar 1, 2024
81515fd
fix
agaudreault Mar 1, 2024
ac08bfb
workflow split namespace
agaudreault Mar 1, 2024
e15683f
switch to clusterRole for multi-ns binding
agaudreault Mar 1, 2024
f383c14
move sa to playground ns
agaudreault Mar 1, 2024
f5fae49
update binding
agaudreault Mar 1, 2024
d3fbd92
workflow token not necessary
agaudreault Mar 1, 2024
254c712
move artifact config in ns
agaudreault Mar 1, 2024
2191faf
move auth to managed namespace... weird
agaudreault Mar 1, 2024
8936788
move events to playground. does not seem to support split controller
agaudreault Mar 1, 2024
a28e01f
manifest have namespace hardcoded
agaudreault Mar 1, 2024
306872e
base apps
agaudreault Mar 1, 2024
8e05457
reorder
agaudreault Mar 1, 2024
fdb1976
Update docs & code review
agaudreault Mar 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Infrastructure
/infrastructure/ @agaudreault @leoluz
/argocd/overlays/production/argocd-rbac-cm.yaml @agaudreault @leoluz
/external-dns/values.yaml @agaudreault @leoluz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably remove this for now until we decide how the ownership is going to be defined for the repo.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I commented it for now to keep track of infrastructure related files.

File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions argo-events/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ kind: Kustomization
resources:
- https://github.com/argoproj/argo-events/manifests/namespace-install
- https://raw.githubusercontent.com/argoproj/argo-events/master/examples/eventbus/native.yaml
- operate-workflow-sa.yaml
- operate-wf-rbac.yaml
- calendar-eventsource.yaml
- workflow-sensor.yaml
- log-sensor.yaml
- base/operate-workflow-sa.yaml
- base/operate-wf-rbac.yaml
- base/calendar-eventsource.yaml
- base/workflow-sensor.yaml
- base/log-sensor.yaml

namespace: argo
namespace: workflow-playground
2 changes: 1 addition & 1 deletion argo-rollouts/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- https://github.com/argoproj/argo-rollouts/releases/download/v1.1.1/install.yaml
- https://github.com/argoproj/argo-rollouts/releases/download/v1.6.6/install.yaml
10 changes: 10 additions & 0 deletions argo-workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Argo Workflows

### Initial deployment

You currently have to create secrets manually

```
kubectl apply -n argo -f resources/argo-server-sso-secret.yaml
kubectl apply -n argo -f resources/argo-workflows-webhook-clients-secret.yaml
```
68 changes: 37 additions & 31 deletions argo-workflows/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,46 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- resources/argo-ns.yaml
- https://github.com/argoproj/argo-workflows/manifests/namespace-install
- https://github.com/argoproj/argo-workflows/manifests/quick-start/base/minio
- https://raw.githubusercontent.com/argoproj/argo-workflows/master/manifests/quick-start/base/artifact-repositories-configmap.yaml
- resources/argo-ns.yaml
- resources/argo-rolebinding.yaml
- resources/argo-server-ingress.yaml
- resources/argo-server-rolebinding.yaml
- resources/argo-workflows-certificate.yaml
- resources/argo-workflows-issuer.yaml
- resources/coinflip-workflowtemplate.yaml
- resources/coinflip-cronworkflow.yaml
- resources/workflow-role.yaml
- resources/workflow-sa.yaml
- resources/workflow-rolebinding.yaml
- resources/read-write-role.yaml
- resources/read-write-sa.yaml
- resources/read-write-rolebinding.yaml
- resources/submit-workflow-template-role.yaml
- resources/github.com-sa.yaml
- resources/github.com-rolebinding.yaml
- resources/github-event-workflowtemplate.yaml
- resources/event-consumer-workfloweventbinding.yaml
- resources/workflow-count-resourcequota.yaml
- https://raw.githubusercontent.com/argoproj-labs/argo-workflows-catalog/master/templates/buildkit/manifests.yaml
- https://raw.githubusercontent.com/argoproj-labs/argo-workflows-catalog/master/templates/slack/manifests.yaml
- https://raw.githubusercontent.com/argoproj-labs/argo-workflows-catalog/master/templates/sendmail/manifests.yaml
- https://raw.githubusercontent.com/argoproj-labs/argo-workflows-catalog/master/templates/distro/manifests.yaml
- https://raw.githubusercontent.com/argoproj/argo-workflows/master/examples/artifacts-workflowtemplate.yaml
- resources/artifacts-cronworkflow.yaml
- https://raw.githubusercontent.com/argoproj/argo-workflows/master/examples/ci-workflowtemplate.yaml
- resources/ci-cronworkflow.yaml

patchesStrategicMerge:
- overlays/workflow-controller-configmap.yaml
- overlays/argo-server-role.yaml
- overlays/argo-server-sa.yaml
- overlays/argo-server-deploy.yaml
- resources/rbac/read-only-clusterrole.yaml
- resources/rbac/read-only-namespaced-clusterrole.yaml
- resources/rbac/read-write-namespaced-clusterrole.yaml

namespace: argo
patches:
- path: overlays/argo-server-deploy.yaml
- path: overlays/argo-server-sa.yaml
- path: overlays/workflow-controller-configmap.yaml
- path: overlays/workflow-controller-deploy.yaml
- path: overlays/argo-role.yaml
options:
allowKindChange: true
allowNameChange: true
target:
group: rbac.authorization.k8s.io
kind: Role
name: argo-role
- path: overlays/argo-rolebinding.yaml
target:
group: rbac.authorization.k8s.io
kind: RoleBinding
name: argo-binding
- path: overlays/argo-server-role.yaml
options:
allowKindChange: true
allowNameChange: true
target:
group: rbac.authorization.k8s.io
kind: Role
name: argo-server-role
- path: overlays/argo-server-rolebinding.yaml
target:
group: rbac.authorization.k8s.io
kind: RoleBinding
name: argo-server-binding
6 changes: 6 additions & 0 deletions argo-workflows/overlays/argo-role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- op: replace
path: /kind
value: ClusterRole
- op: replace
path: /metadata/name
value: argo-workflows-argo-role
6 changes: 6 additions & 0 deletions argo-workflows/overlays/argo-rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- op: replace
path: /roleRef/kind
value: ClusterRole
- op: replace
path: /roleRef/name
value: argo-workflows-argo-role
2 changes: 2 additions & 0 deletions argo-workflows/overlays/argo-server-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ spec:
args:
- server
- --namespaced
- --managed-namespace
- workflow-playground
- --auth-mode=sso
- --auth-mode=client
- --x-frame-options=SAMEORIGIN
67 changes: 6 additions & 61 deletions argo-workflows/overlays/argo-server-role.yaml
Original file line number Diff line number Diff line change
@@ -1,61 +1,6 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: argo-server-role
rules:
- apiGroups:
- ''
resources:
- configmaps
verbs:
- get
- watch
- list
- apiGroups:
- ''
resources:
- secrets
verbs:
- get
- create
- list
- watch
- apiGroups:
- ''
resources:
- pods
- pods/exec
- pods/log
verbs:
- get
- list
- watch
- apiGroups:
- ''
resources:
- events
verbs:
- patch
- watch
- apiGroups:
- ''
resources:
- serviceaccounts
verbs:
- get
- list
- watch
- apiGroups:
- argoproj.io
resources:
- eventsources
- sensors
- workflows
- workfloweventbindings
- workflowtemplates
- cronworkflows
- cronworkflows/finalizers
verbs:
- get
- list
- watch
- op: replace
path: /kind
value: ClusterRole
- op: replace
path: /metadata/name
value: argo-workflows-argo-server-role
6 changes: 6 additions & 0 deletions argo-workflows/overlays/argo-server-rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- op: replace
path: /roleRef/kind
value: ClusterRole
- op: replace
path: /roleRef/name
value: argo-workflows-argo-server-role
2 changes: 0 additions & 2 deletions argo-workflows/overlays/argo-server-sa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,3 @@ kind: ServiceAccount
apiVersion: v1
metadata:
name: argo-server
annotations:
workflows.argoproj.io/rbac-rule: "true"
13 changes: 13 additions & 0 deletions argo-workflows/overlays/workflow-controller-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: workflow-controller
spec:
template:
spec:
containers:
- name: workflow-controller
args:
- --namespaced
- --managed-namespace
- workflow-playground
6 changes: 4 additions & 2 deletions argo-workflows/resources/argo-rolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: argo
namespace: workflow-playground # Gives permission in the managed namespace
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: workflow-role
kind: ClusterRole
name: argo-workflows-argo-role
subjects:
- kind: ServiceAccount
name: argo
namespace: argo
2 changes: 1 addition & 1 deletion argo-workflows/resources/argo-server-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ metadata:
annotations:
# https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/
ingress.kubernetes.io/proxy-body-size: 100M
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/app-root: "/"
nginx.ingress.kubernetes.io/backend-protocol: HTTPS
spec:
ingressClassName: nginx
tls:
- hosts:
- workflows.apps.argoproj.io
Expand Down
13 changes: 13 additions & 0 deletions argo-workflows/resources/argo-server-rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: argo-server-binding
namespace: workflow-playground # Gives permission in the managed namespace
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: argo-workflows-argo-server-role
subjects:
- kind: ServiceAccount
name: argo-server
namespace: argo
4 changes: 2 additions & 2 deletions argo-workflows/resources/argo-workflows-certificate.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: cert-manager.io/v1alpha2
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: argo-workflows-cert
Expand All @@ -9,4 +9,4 @@ spec:
kind: Issuer
commonName: workflows.apps.argoproj.io
dnsNames:
- workflows.apps.argoproj.io
- workflows.apps.argoproj.io
14 changes: 7 additions & 7 deletions argo-workflows/resources/argo-workflows-issuer.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
apiVersion: cert-manager.io/v1alpha2
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: argo-workflows-issuer
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: amatyushentsev@gmail.com
email: argoproj@gmail.com
privateKeySecretRef:
name: letsencrypt
solvers:
# An empty 'selector' means that this solver matches all domains
- selector: {}
http01:
ingress:
class: nginx
# An empty 'selector' means that this solver matches all domains
- selector: {}
http01:
ingress:
class: nginx
14 changes: 14 additions & 0 deletions argo-workflows/resources/rbac/read-only-clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: argo-workflows-read-only
rules:
- apiGroups:
- argoproj.io
resources:
- clusterworkflowtemplates
- clusteranalysistemplates
verbs:
- get
- list
- watch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: argo-workflows-read-only-namespaced
rules:
- apiGroups:
- ''
resources:
- pods
- pods/log
verbs:
- get
- list
- apiGroups:
- ''
resources:
- events
verbs:
- watch
- apiGroups:
- argoproj.io
resources:
- eventsources
- sensors
- workflows
- workfloweventbindings
- workflowtemplates
- cronworkflows
verbs:
- get
- list
- watch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
kind: ClusterRole
metadata:
name: read-write
name: argo-workflows-read-write-namespaced
rules:
- apiGroups:
- ''
Expand Down
1 change: 1 addition & 0 deletions argocd/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/argo-cd-auth-secret.yaml
12 changes: 6 additions & 6 deletions argocd/base/argo-cd-issuer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ metadata:
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: amatyushentsev@gmail.com
email: argoproj@gmail.com
privateKeySecretRef:
name: letsencrypt
solvers:
# An empty 'selector' means that this solver matches all domains
- selector: {}
http01:
ingress:
class: nginx
# An empty 'selector' means that this solver matches all domains
- selector: {}
http01:
ingress:
class: nginx
Loading