diff --git a/hack/update-manifests.sh b/hack/update-manifests.sh index b24787e3f489..57d4ef95058a 100755 --- a/hack/update-manifests.sh +++ b/hack/update-manifests.sh @@ -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 diff --git a/manifests/base/kustomization.yaml b/manifests/base/kustomization.yaml new file mode 100644 index 000000000000..1eba2f5ca95c --- /dev/null +++ b/manifests/base/kustomization.yaml @@ -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 diff --git a/manifests/cluster-install/kustomization.yaml b/manifests/cluster-install/kustomization.yaml deleted file mode 100644 index d6d5c37b94a0..000000000000 --- a/manifests/cluster-install/kustomization.yaml +++ /dev/null @@ -1,15 +0,0 @@ -namespace: argo - -resources: -- ../base/01a_workflow-crd.yaml -- ../base/01b_workflow-aggregate-roles.yaml -- ../base/02a_workflow-controller-sa.yaml -- ../base/02b_workflow-controller-clusterrole.yaml -- ../base/02c_workflow-controller-clusterrolebinding.yaml -- ../base/02d_workflow-controller-configmap.yaml -- ../base/02e_workflow-controller-deployment.yaml -- ../base/03a_argo-ui-sa.yaml -- ../base/03b_argo-ui-clusterrole.yaml -- ../base/03c_argo-ui-clusterrolebinding.yaml -- ../base/03d_argo-ui-deployment.yaml -- ../base/03e_argo-ui-service.yaml diff --git a/manifests/namespace-install.yaml b/manifests/namespace-install.yaml index 8453fec54ca2..e4761e5b1ca0 100644 --- a/manifests/namespace-install.yaml +++ b/manifests/namespace-install.yaml @@ -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: - "" @@ -73,6 +76,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: argo-ui-role + namespace: argo rules: - apiGroups: - "" @@ -103,6 +107,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: argo-binding + namespace: argo roleRef: apiGroup: rbac.authorization.k8s.io kind: Role @@ -110,11 +115,13 @@ roleRef: 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 @@ -122,6 +129,7 @@ roleRef: subjects: - kind: ServiceAccount name: argo-ui + namespace: argo --- apiVersion: v1 data: @@ -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 @@ -146,6 +156,7 @@ apiVersion: apps/v1beta2 kind: Deployment metadata: name: argo-ui + namespace: argo spec: selector: matchLabels: @@ -157,6 +168,8 @@ spec: spec: containers: - env: + - name: FORCE_NAMESPACE_ISOLATION + value: "true" - name: ARGO_NAMESPACE valueFrom: fieldRef: @@ -168,7 +181,7 @@ 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 --- @@ -176,6 +189,7 @@ apiVersion: apps/v1beta2 kind: Deployment metadata: name: workflow-controller + namespace: argo spec: selector: matchLabels: diff --git a/manifests/namespace-install/kustomization.yaml b/manifests/namespace-install/kustomization.yaml deleted file mode 100644 index 5533dbdabe13..000000000000 --- a/manifests/namespace-install/kustomization.yaml +++ /dev/null @@ -1,15 +0,0 @@ -resources: -- ../base/01a_workflow-crd.yaml -- ../base/02a_workflow-controller-sa.yaml -- ./02b_workflow-controller-role.yaml -- ./02c_workflow-controller-rolebinding.yaml -- ./02d_workflow-controller-configmap.yaml -- ../base/02e_workflow-controller-deployment.yaml -- ../base/03a_argo-ui-sa.yaml -- ./03b_argo-ui-role.yaml -- ./03c_argo-ui-rolebinding.yaml -- ../base/03d_argo-ui-deployment.yaml -- ../base/03e_argo-ui-service.yaml - -patches: -- ./overlays/03d_argo-ui-deployment.yaml diff --git a/manifests/base/02b_workflow-controller-clusterrole.yaml b/manifests/overlays/cluster-install/02b_workflow-controller-clusterrole.yaml similarity index 100% rename from manifests/base/02b_workflow-controller-clusterrole.yaml rename to manifests/overlays/cluster-install/02b_workflow-controller-clusterrole.yaml diff --git a/manifests/base/02c_workflow-controller-clusterrolebinding.yaml b/manifests/overlays/cluster-install/02c_workflow-controller-clusterrolebinding.yaml similarity index 100% rename from manifests/base/02c_workflow-controller-clusterrolebinding.yaml rename to manifests/overlays/cluster-install/02c_workflow-controller-clusterrolebinding.yaml diff --git a/manifests/base/02d_workflow-controller-configmap.yaml b/manifests/overlays/cluster-install/02d_workflow-controller-configmap.yaml similarity index 100% rename from manifests/base/02d_workflow-controller-configmap.yaml rename to manifests/overlays/cluster-install/02d_workflow-controller-configmap.yaml diff --git a/manifests/base/03b_argo-ui-clusterrole.yaml b/manifests/overlays/cluster-install/03b_argo-ui-clusterrole.yaml similarity index 100% rename from manifests/base/03b_argo-ui-clusterrole.yaml rename to manifests/overlays/cluster-install/03b_argo-ui-clusterrole.yaml diff --git a/manifests/base/03c_argo-ui-clusterrolebinding.yaml b/manifests/overlays/cluster-install/03c_argo-ui-clusterrolebinding.yaml similarity index 100% rename from manifests/base/03c_argo-ui-clusterrolebinding.yaml rename to manifests/overlays/cluster-install/03c_argo-ui-clusterrolebinding.yaml diff --git a/manifests/overlays/cluster-install/kustomization.yaml b/manifests/overlays/cluster-install/kustomization.yaml new file mode 100644 index 000000000000..6a7c13b680d0 --- /dev/null +++ b/manifests/overlays/cluster-install/kustomization.yaml @@ -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 diff --git a/manifests/namespace-install/02b_workflow-controller-role.yaml b/manifests/overlays/namespace-install/02b_workflow-controller-role.yaml similarity index 100% rename from manifests/namespace-install/02b_workflow-controller-role.yaml rename to manifests/overlays/namespace-install/02b_workflow-controller-role.yaml diff --git a/manifests/namespace-install/02c_workflow-controller-rolebinding.yaml b/manifests/overlays/namespace-install/02c_workflow-controller-rolebinding.yaml similarity index 100% rename from manifests/namespace-install/02c_workflow-controller-rolebinding.yaml rename to manifests/overlays/namespace-install/02c_workflow-controller-rolebinding.yaml diff --git a/manifests/namespace-install/02d_workflow-controller-configmap.yaml b/manifests/overlays/namespace-install/02d_workflow-controller-configmap.yaml similarity index 100% rename from manifests/namespace-install/02d_workflow-controller-configmap.yaml rename to manifests/overlays/namespace-install/02d_workflow-controller-configmap.yaml diff --git a/manifests/namespace-install/03b_argo-ui-role.yaml b/manifests/overlays/namespace-install/03b_argo-ui-role.yaml similarity index 100% rename from manifests/namespace-install/03b_argo-ui-role.yaml rename to manifests/overlays/namespace-install/03b_argo-ui-role.yaml diff --git a/manifests/namespace-install/03c_argo-ui-rolebinding.yaml b/manifests/overlays/namespace-install/03c_argo-ui-rolebinding.yaml similarity index 100% rename from manifests/namespace-install/03c_argo-ui-rolebinding.yaml rename to manifests/overlays/namespace-install/03c_argo-ui-rolebinding.yaml diff --git a/manifests/namespace-install/overlays/03d_argo-ui-deployment.yaml b/manifests/overlays/namespace-install/03d_argo-ui-deployment.yaml similarity index 82% rename from manifests/namespace-install/overlays/03d_argo-ui-deployment.yaml rename to manifests/overlays/namespace-install/03d_argo-ui-deployment.yaml index 1efc2479f270..40205d9ef802 100644 --- a/manifests/namespace-install/overlays/03d_argo-ui-deployment.yaml +++ b/manifests/overlays/namespace-install/03d_argo-ui-deployment.yaml @@ -7,6 +7,7 @@ spec: spec: containers: - name: argo-ui + image: argoproj/argoui:v2.2.1-37808b1 env: - name: FORCE_NAMESPACE_ISOLATION value: "true" diff --git a/manifests/overlays/namespace-install/kustomization.yaml b/manifests/overlays/namespace-install/kustomization.yaml new file mode 100644 index 000000000000..6cd22b6056be --- /dev/null +++ b/manifests/overlays/namespace-install/kustomization.yaml @@ -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