diff --git a/argocd/applications/make-space-ci.yaml b/argocd/applications/make-space-ci.yaml new file mode 100644 index 0000000..392a2e5 --- /dev/null +++ b/argocd/applications/make-space-ci.yaml @@ -0,0 +1,22 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: make-space-ci + namespace: argocd + annotations: + argocd.argoproj.io/sync-wave: "6" +spec: + project: ci + source: + repoURL: https://git.dahyeon.us/dahyeon/service-state.git + targetRevision: main + path: ci/make-space + destination: + server: https://kubernetes.default.svc + namespace: tekton-ci + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - SkipDryRunOnMissingResource=true diff --git a/argocd/applicationsets/services-prod.yaml b/argocd/applicationsets/services-prod.yaml index d09d373..798df9b 100644 --- a/argocd/applicationsets/services-prod.yaml +++ b/argocd/applicationsets/services-prod.yaml @@ -27,7 +27,7 @@ spec: server: https://kubernetes.default.svc namespace: "{{index .path.segments 1}}-prod" templatePatch: | - {{- if eq (index .path.segments 1) "url-shortener" }} + {{- if or (eq (index .path.segments 1) "url-shortener") (eq (index .path.segments 1) "make-space") }} spec: syncPolicy: automated: diff --git a/clusters/main/namespaces.yaml b/clusters/main/namespaces.yaml index 099069f..81fef4d 100644 --- a/clusters/main/namespaces.yaml +++ b/clusters/main/namespaces.yaml @@ -87,3 +87,13 @@ apiVersion: v1 kind: Namespace metadata: name: persona-lenz-staging +--- +apiVersion: v1 +kind: Namespace +metadata: + name: make-space-staging +--- +apiVersion: v1 +kind: Namespace +metadata: + name: make-space-prod diff --git a/platform/tekton/config/eventlistener-rbac.yaml b/platform/tekton/config/eventlistener-rbac.yaml index 43efe35..0c01770 100644 --- a/platform/tekton/config/eventlistener-rbac.yaml +++ b/platform/tekton/config/eventlistener-rbac.yaml @@ -53,3 +53,31 @@ subjects: - kind: ServiceAccount name: url-shortener-event-listener namespace: tekton-ci +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: make-space-tekton-eventlistener-interceptors +rules: + - apiGroups: + - triggers.tekton.dev + resources: + - clusterinterceptors + - clustertriggerbindings + verbs: + - get + - list + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: make-space-tekton-eventlistener-interceptors +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: make-space-tekton-eventlistener-interceptors +subjects: + - kind: ServiceAccount + name: make-space-event-listener + namespace: tekton-ci