Skip to content

Commit

Permalink
Reorganize manifests to kustomize 2 and update version to v2.3.0-rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
jessesuen committed Apr 10, 2019
1 parent 75b28a3 commit 40f9a87
Show file tree
Hide file tree
Showing 33 changed files with 112 additions and 60 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.0
2.3.0-rc1
2 changes: 1 addition & 1 deletion api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"swagger": "2.0",
"info": {
"title": "Argo",
"version": "v2.3.0"
"version": "v2.3.0-rc1"
},
"paths": {},
"definitions": {
Expand Down
25 changes: 17 additions & 8 deletions hack/update-manifests.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
#!/bin/sh
#!/bin/sh -x -e

IMAGE_NAMESPACE=${IMAGE_NAMESPACE:='argoproj'}
IMAGE_TAG=${IMAGE_TAG:='latest'}
SRCROOT="$( CDPATH='' cd -- "$(dirname "$0")/.." && pwd -P )"
AUTOGENMSG="# This is an auto-generated file. DO NOT EDIT"

autogen_warning="# This is an auto-generated file. DO NOT EDIT"
IMAGE_NAMESPACE="${IMAGE_NAMESPACE:-argoproj}"
IMAGE_TAG="${IMAGE_TAG:-latest}"

echo $autogen_warning > manifests/install.yaml
kustomize build manifests/cluster-install >> manifests/install.yaml
cd ${SRCROOT}/manifests/base && kustomize edit set image \
argoproj/workflow-controller=${IMAGE_NAMESPACE}/workflow-controller:${IMAGE_TAG} \
argoproj/argoui=${IMAGE_NAMESPACE}/argoui:${IMAGE_TAG}

echo $autogen_warning > manifests/namespace-install.yaml
kustomize build manifests/namespace-install >> manifests/namespace-install.yaml
echo "${AUTOGENMSG}" > "${SRCROOT}/manifests/install.yaml"
kustomize build "${SRCROOT}/manifests/cluster-install" >> "${SRCROOT}/manifests/install.yaml"
sed -i.bak "s@- .*/argoexec:.*@- ${IMAGE_NAMESPACE}/argoexec:${IMAGE_TAG}@" "${SRCROOT}/manifests/install.yaml"
rm -f "${SRCROOT}/manifests/install.yaml.bak"

echo "${AUTOGENMSG}" > "${SRCROOT}/manifests/namespace-install.yaml"
kustomize build "${SRCROOT}/manifests/namespace-install" >> "${SRCROOT}/manifests/namespace-install.yaml"
sed -i.bak "s@- .*/argoexec:.*@- ${IMAGE_NAMESPACE}/argoexec:${IMAGE_TAG}@" "${SRCROOT}/manifests/namespace-install.yaml"
rm -f "${SRCROOT}/manifests/namespace-install.yaml.bak"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: apps/v1beta2
apiVersion: apps/v1
kind: Deployment
metadata:
name: argo-ui
Expand All @@ -14,7 +14,7 @@ spec:
serviceAccountName: argo-ui
containers:
- name: argo-ui
image: argoproj/argoui:v2.2.1
image: argoproj/argoui:latest
env:
- name: ARGO_NAMESPACE
valueFrom:
Expand Down
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions manifests/base/argo-ui/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- argo-ui-deployment.yaml
- argo-ui-sa.yaml
- argo-ui-service.yaml
5 changes: 5 additions & 0 deletions manifests/base/crds/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- workflow-crd.yaml
File renamed without changes.
15 changes: 15 additions & 0 deletions manifests/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

bases:
- crds
- workflow-controller
- argo-ui

images:
- name: argoproj/argoui
newName: argoproj/argoui
newTag: v2.3.0-rc1
- name: argoproj/workflow-controller
newName: argoproj/workflow-controller
newTag: v2.3.0-rc1
7 changes: 7 additions & 0 deletions manifests/base/workflow-controller/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- workflow-controller-configmap.yaml
- workflow-controller-deployment.yaml
- workflow-controller-sa.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: apps/v1beta2
apiVersion: apps/v1
kind: Deployment
metadata:
name: workflow-controller
Expand All @@ -14,11 +14,11 @@ spec:
serviceAccountName: argo
containers:
- name: workflow-controller
image: argoproj/workflow-controller:v2.2.1
image: argoproj/workflow-controller:latest
command:
- workflow-controller
args:
- --configmap
- workflow-controller-configmap
- --executor-image
- argoproj/argoexec:v2.2.1
- argoproj/argoexec:latest
File renamed without changes.
6 changes: 6 additions & 0 deletions manifests/cluster-install/argo-ui-rbac/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- argo-ui-clusterrole.yaml
- argo-ui-clusterrolebinding.yaml
20 changes: 6 additions & 14 deletions manifests/cluster-install/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
namespace: argo
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

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
bases:
- ../base
- ./workflow-controller-rbac
- ./argo-ui-rbac
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- workflow-aggregate-roles.yaml
- workflow-controller-clusterrole.yaml
- workflow-controller-clusterrolebinding.yaml
16 changes: 5 additions & 11 deletions manifests/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ 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: ClusterRole
Expand Down Expand Up @@ -192,25 +190,22 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: workflow-controller-configmap
namespace: argo
---
apiVersion: v1
kind: Service
metadata:
name: argo-ui
namespace: argo
spec:
ports:
- port: 80
targetPort: 8001
selector:
app: argo-ui
---
apiVersion: apps/v1beta2
apiVersion: apps/v1
kind: Deployment
metadata:
name: argo-ui
namespace: argo
spec:
selector:
matchLabels:
Expand All @@ -233,15 +228,14 @@ spec:
value: "false"
- name: BASE_HREF
value: /
image: argoproj/argoui:v2.2.1
image: argoproj/argoui:v2.3.0-rc1
name: argo-ui
serviceAccountName: argo-ui
---
apiVersion: apps/v1beta2
apiVersion: apps/v1
kind: Deployment
metadata:
name: workflow-controller
namespace: argo
spec:
selector:
matchLabels:
Expand All @@ -256,9 +250,9 @@ spec:
- --configmap
- workflow-controller-configmap
- --executor-image
- argoproj/argoexec:v2.2.1
- argoproj/argoexec:v2.3.0-rc1
command:
- workflow-controller
image: argoproj/workflow-controller:v2.2.1
image: argoproj/workflow-controller:v2.3.0-rc1
name: workflow-controller
serviceAccountName: argo
12 changes: 7 additions & 5 deletions manifests/namespace-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ spec:
selector:
app: argo-ui
---
apiVersion: apps/v1beta2
apiVersion: apps/v1
kind: Deployment
metadata:
name: argo-ui
Expand All @@ -157,6 +157,8 @@ spec:
spec:
containers:
- env:
- name: FORCE_NAMESPACE_ISOLATION
value: "true"
- name: ARGO_NAMESPACE
valueFrom:
fieldRef:
Expand All @@ -168,11 +170,11 @@ spec:
value: "false"
- name: BASE_HREF
value: /
image: argoproj/argoui:v2.2.1
image: argoproj/argoui:v2.3.0-rc1
name: argo-ui
serviceAccountName: argo-ui
---
apiVersion: apps/v1beta2
apiVersion: apps/v1
kind: Deployment
metadata:
name: workflow-controller
Expand All @@ -190,9 +192,9 @@ spec:
- --configmap
- workflow-controller-configmap
- --executor-image
- argoproj/argoexec:v2.2.1
- argoproj/argoexec:v2.3.0-rc1
command:
- workflow-controller
image: argoproj/workflow-controller:v2.2.1
image: argoproj/workflow-controller:v2.3.0-rc1
name: workflow-controller
serviceAccountName: argo
6 changes: 6 additions & 0 deletions manifests/namespace-install/argo-ui-rbac/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- argo-ui-role.yaml
- argo-ui-rolebinding.yaml
24 changes: 10 additions & 14 deletions manifests/namespace-install/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
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
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

patches:
- ./overlays/03d_argo-ui-deployment.yaml
bases:
- ../base
- ./workflow-controller-rbac
- ./argo-ui-rbac

patchesStrategicMerge:
- ./overlays/workflow-controller-configmap.yaml
- ./overlays/argo-ui-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: apps/v1beta2
apiVersion: apps/v1
kind: Deployment
metadata:
name: argo-ui
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- workflow-controller-role.yaml
- workflow-controller-rolebinding.yaml

0 comments on commit 40f9a87

Please sign in to comment.