diff --git a/clank/apps/prod/darklight/client.yaml b/clank/apps/prod/darklight/client.yaml new file mode 100644 index 0000000..0d5169e --- /dev/null +++ b/clank/apps/prod/darklight/client.yaml @@ -0,0 +1,52 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: darklight +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: darklight-client-deployment + namespace: darklight + labels: + app: darklight-client +spec: + replicas: 3 + selector: + matchLabels: + app: darklight-client + template: + metadata: + labels: + app: darklight-client + spec: + containers: + - name: darklight-client + image: kasperhermansen/darklight-client + ports: + - containerPort: 3000 + livenessProbe: + httpGet: + path: / + port: 3000 + initialDelaySeconds: 5 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: / + port: 3000 + initialDelaySeconds: 5 + timeoutSeconds: 5 +--- +apiVersion: v1 +kind: Service +metadata: + name: darklight-client + namespace: darklight +spec: + ports: + - port: 80 + name: http + targetPort: 3000 + selector: + app: darklight-client diff --git a/clank/apps/prod/darklight/ingress.yaml b/clank/apps/prod/darklight/ingress.yaml new file mode 100644 index 0000000..5f93001 --- /dev/null +++ b/clank/apps/prod/darklight/ingress.yaml @@ -0,0 +1,26 @@ +apiVersion: traefik.containo.us/v1alpha1 +kind: IngressRoute +metadata: + name: darklight + namespace: darklight +spec: + entryPoints: + - web + - websecure + routes: + - match: Host(`darklight.kjuulh.app`) + kind: Rule + services: + - name: darklight-client + kind: Service + namespace: darklight + port: 80 + - match: Host(`darklight-api.kjuulh.app`) + kind: Rule + services: + - name: darklight-server + kind: Service + namespace: darklight + port: 80 + tls: + secretName: clank-cert diff --git a/clank/apps/prod/darklight/kustomization.yaml b/clank/apps/prod/darklight/kustomization.yaml new file mode 100644 index 0000000..b0aaec8 --- /dev/null +++ b/clank/apps/prod/darklight/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - client.yaml + - server.yaml + - ingress.yaml diff --git a/clank/apps/prod/darklight/server.yaml b/clank/apps/prod/darklight/server.yaml new file mode 100644 index 0000000..18ff236 --- /dev/null +++ b/clank/apps/prod/darklight/server.yaml @@ -0,0 +1,52 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: darklight +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: darklight-client-deployment + namespace: darklight + labels: + app: darklight-client +spec: + replicas: 3 + selector: + matchLabels: + app: darklight-client + template: + metadata: + labels: + app: darklight-client + spec: + containers: + - name: darklight-client + image: kasperhermansen/darklight-client + ports: + - containerPort: 3000 + livenessProbe: + httpGet: + path: / + port: 3000 + initialDelaySeconds: 5 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: / + port: 3000 + initialDelaySeconds: 5 + timeoutSeconds: 5 +--- +apiVersion: v1 +kind: Service +metadata: + name: darklight-client + namespace: darklight +spec: + ports: + - port: 80 + name: http + targetPort: 80 + selector: + app: darklight-client diff --git a/clank/clusters/prod/darklight/app.yaml b/clank/clusters/prod/darklight/app.yaml new file mode 100644 index 0000000..be8139e --- /dev/null +++ b/clank/clusters/prod/darklight/app.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +kind: Kustomization +metadata: + name: darklight + namespace: prod +spec: + interval: 10m0s + retryInterval: 30s + path: ./clank/apps/prod/darklight + prune: true + sourceRef: + kind: GitRepository + name: flux-system + namespace: flux-system + targetNamespace: darklight diff --git a/clank/platform/cert-manager/certificate.yaml b/clank/platform/cert-manager/certificate.yaml index f6d9333..a15ca54 100644 --- a/clank/platform/cert-manager/certificate.yaml +++ b/clank/platform/cert-manager/certificate.yaml @@ -16,6 +16,6 @@ spec: secretTemplate: annotations: reflector.v1.k8s.emberstack.com/reflection-allowed: "true" - reflector.v1.k8s.emberstack.com/reflection-allowed-namespaces: "platform,kube-system,wishlist" # Control destination namespaces + reflector.v1.k8s.emberstack.com/reflection-allowed-namespaces: "platform,kube-system,wishlist,darklight" # Control destination namespaces reflector.v1.k8s.emberstack.com/reflection-auto-enabled: "true" # Auto create reflection for matching namespaces - reflector.v1.k8s.emberstack.com/reflection-auto-namespaces: "platform,wishlist" # Control auto-reflection namespaces + reflector.v1.k8s.emberstack.com/reflection-auto-namespaces: "platform,wishlist,darklight" # Control auto-reflection namespaces