diff --git a/argocd/applications/blog-ci.yaml b/argocd/applications/blog-ci.yaml new file mode 100644 index 0000000..f9442aa --- /dev/null +++ b/argocd/applications/blog-ci.yaml @@ -0,0 +1,22 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: blog-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/blog + 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 798df9b..21aa39d 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 or (eq (index .path.segments 1) "url-shortener") (eq (index .path.segments 1) "make-space") }} + {{- if or (eq (index .path.segments 1) "url-shortener") (eq (index .path.segments 1) "make-space") (eq (index .path.segments 1) "blog") }} spec: syncPolicy: automated: diff --git a/clusters/main/namespaces.yaml b/clusters/main/namespaces.yaml index 5596668..8718d41 100644 --- a/clusters/main/namespaces.yaml +++ b/clusters/main/namespaces.yaml @@ -100,5 +100,15 @@ metadata: --- apiVersion: v1 kind: Namespace +metadata: + name: blog-staging +--- +apiVersion: v1 +kind: Namespace +metadata: + name: blog-prod +--- +apiVersion: v1 +kind: Namespace metadata: name: platform diff --git a/docs/tekton-ci-cd.md b/docs/tekton-ci-cd.md index 204f3f3..29eb812 100644 --- a/docs/tekton-ci-cd.md +++ b/docs/tekton-ci-cd.md @@ -1,5 +1,11 @@ # Spec: Tekton CI/CD for lolympus-tournament-support +This document's original main-to-staging/manual-production contract is specific +to lolympus. Blog follows make-space: source `staging` and `prod` branches each +run a dedicated pipeline and both environments auto-sync. Blog registration is +`argocd/applications/blog-ci.yaml`; its complete delivery/secret contract is in +service-state `ci/blog/README.md` and `apps/blog/README.md`. + ## Objective Build a GitOps-native staging delivery path for the lolympus monorepo on the diff --git a/platform/cert-manager/resources/clusterissuer-letsencrypt-prod.yaml b/platform/cert-manager/resources/clusterissuer-letsencrypt-prod.yaml index 9dab221..843e131 100644 --- a/platform/cert-manager/resources/clusterissuer-letsencrypt-prod.yaml +++ b/platform/cert-manager/resources/clusterissuer-letsencrypt-prod.yaml @@ -23,3 +23,11 @@ spec: resourceGroupName: dahyeon hostedZoneName: dahyeon.us environment: AzurePublicCloud + # rabbitmaus.com is outside the Azure DNS zone managed above. + # Public HTTP traffic for the ACME challenge must reach HAProxy. + - selector: + dnsNames: + - rabbitmaus.com + http01: + ingress: + ingressClassName: haproxy diff --git a/platform/tekton/config/eventlistener-rbac.yaml b/platform/tekton/config/eventlistener-rbac.yaml index 0c01770..0389f17 100644 --- a/platform/tekton/config/eventlistener-rbac.yaml +++ b/platform/tekton/config/eventlistener-rbac.yaml @@ -81,3 +81,31 @@ subjects: - kind: ServiceAccount name: make-space-event-listener namespace: tekton-ci +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: blog-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: blog-tekton-eventlistener-interceptors +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: blog-tekton-eventlistener-interceptors +subjects: + - kind: ServiceAccount + name: blog-event-listener + namespace: tekton-ci