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

Refactor kustomize configs #1129

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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: 2 additions & 2 deletions hack/update-manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ IMAGE_TAG=${IMAGE_TAG:='latest'}
autogen_warning="# This is an auto-generated file. DO NOT EDIT"

echo $autogen_warning > manifests/install.yaml
kustomize build manifests/cluster-install >> manifests/install.yaml
kustomize build manifests/overlays/cluster-install >> manifests/install.yaml

echo $autogen_warning > manifests/namespace-install.yaml
kustomize build manifests/namespace-install >> manifests/namespace-install.yaml
kustomize build manifests/overlays/namespace-install >> manifests/namespace-install.yaml
9 changes: 9 additions & 0 deletions manifests/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace: argo

resources:
- 01a_workflow-crd.yaml
- 02a_workflow-controller-sa.yaml
- 02e_workflow-controller-deployment.yaml
- 03a_argo-ui-sa.yaml
- 03d_argo-ui-deployment.yaml
- 03e_argo-ui-service.yaml
15 changes: 0 additions & 15 deletions manifests/cluster-install/kustomization.yaml

This file was deleted.

16 changes: 15 additions & 1 deletion manifests/namespace-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: argo-ui
namespace: argo
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: argo
namespace: argo
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: argo-role
namespace: argo
rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -73,6 +76,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: argo-ui-role
namespace: argo
rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -103,25 +107,29 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: argo-binding
namespace: argo
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: argo-role
subjects:
- kind: ServiceAccount
name: argo
namespace: argo
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: argo-ui-binding
namespace: argo
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: argo-ui-role
subjects:
- kind: ServiceAccount
name: argo-ui
namespace: argo
---
apiVersion: v1
data:
Expand All @@ -130,11 +138,13 @@ data:
kind: ConfigMap
metadata:
name: workflow-controller-configmap
namespace: argo
---
apiVersion: v1
kind: Service
metadata:
name: argo-ui
namespace: argo
spec:
ports:
- port: 80
Expand All @@ -146,6 +156,7 @@ apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: argo-ui
namespace: argo
spec:
selector:
matchLabels:
Expand All @@ -157,6 +168,8 @@ spec:
spec:
containers:
- env:
- name: FORCE_NAMESPACE_ISOLATION
value: "true"
- name: ARGO_NAMESPACE
valueFrom:
fieldRef:
Expand All @@ -168,14 +181,15 @@ spec:
value: "false"
- name: BASE_HREF
value: /
image: argoproj/argoui:v2.2.1
image: argoproj/argoui:v2.2.1-37808b1
name: argo-ui
serviceAccountName: argo-ui
---
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: workflow-controller
namespace: argo
spec:
selector:
matchLabels:
Expand Down
15 changes: 0 additions & 15 deletions manifests/namespace-install/kustomization.yaml

This file was deleted.

11 changes: 11 additions & 0 deletions manifests/overlays/cluster-install/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace: argo
bases:
- ../../base
resources:
- ./03b_argo-ui-clusterrole.yaml
- ./03c_argo-ui-clusterrolebinding.yaml
- ./02b_workflow-controller-clusterrole.yaml
- ./02c_workflow-controller-clusterrolebinding.yaml
- ./02d_workflow-controller-configmap.yaml

- ../../base/01b_workflow-aggregate-roles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ spec:
spec:
containers:
- name: argo-ui
image: argoproj/argoui:v2.2.1-37808b1
env:
- name: FORCE_NAMESPACE_ISOLATION
value: "true"
11 changes: 11 additions & 0 deletions manifests/overlays/namespace-install/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace: argo
bases:
- ../../base
resources:
- ./03b_argo-ui-role.yaml
- ./03c_argo-ui-rolebinding.yaml
- ./02b_workflow-controller-role.yaml
- ./02c_workflow-controller-rolebinding.yaml
- ./02d_workflow-controller-configmap.yaml
patches:
- ./03d_argo-ui-deployment.yaml