diff --git a/_/Namespace/third-places.yaml b/_/Namespace/third-places.yaml new file mode 100644 index 0000000..cb170f9 --- /dev/null +++ b/_/Namespace/third-places.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: third-places diff --git a/third-places/Deployment/third-places.yaml b/third-places/Deployment/third-places.yaml new file mode 100644 index 0000000..42f4874 --- /dev/null +++ b/third-places/Deployment/third-places.yaml @@ -0,0 +1,43 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/component: application + app.kubernetes.io/instance: third-places + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: third-places + app.kubernetes.io/version: 0.1.2 + helm.sh/chart: third-places-0.1.0 + name: third-places + namespace: third-places +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/component: application + app.kubernetes.io/instance: third-places + app.kubernetes.io/name: third-places + template: + metadata: + labels: + app.kubernetes.io/component: application + app.kubernetes.io/instance: third-places + app.kubernetes.io/name: third-places + spec: + containers: + - image: 'ghcr.io/codeforphilly/third-places:0.1.2' + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: / + port: http + name: third-places + ports: + - containerPort: 80 + name: http + protocol: TCP + readinessProbe: + httpGet: + path: / + port: http + resources: {} diff --git a/third-places/Ingress/third-places.yaml b/third-places/Ingress/third-places.yaml new file mode 100644 index 0000000..487753a --- /dev/null +++ b/third-places/Ingress/third-places.yaml @@ -0,0 +1,31 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + labels: + app.kubernetes.io/component: application + app.kubernetes.io/instance: third-places + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: third-places + app.kubernetes.io/version: 0.1.2 + helm.sh/chart: third-places-0.1.0 + name: third-places + namespace: third-places +spec: + ingressClassName: nginx + rules: + - host: third-places.live.k8s.phl.io + http: + paths: + - backend: + service: + name: third-places + port: + number: 80 + path: / + pathType: Prefix + tls: + - hosts: + - third-places.live.k8s.phl.io + secretName: choose-native-plants-tls diff --git a/third-places/Service/third-places-postgresql.yaml b/third-places/Service/third-places-postgresql.yaml new file mode 100644 index 0000000..15ddc2f --- /dev/null +++ b/third-places/Service/third-places-postgresql.yaml @@ -0,0 +1,22 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: postgresql + app.kubernetes.io/instance: third-places + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: third-places + app.kubernetes.io/version: 0.1.2 + helm.sh/chart: third-places-0.1.0 + name: third-places-postgresql + namespace: third-places +spec: + ports: + - name: postgresql + nodePort: 30432 + port: 5432 + selector: + app.kubernetes.io/component: postgresql + app.kubernetes.io/instance: third-places + app.kubernetes.io/name: third-places + type: ClusterIP diff --git a/third-places/Service/third-places.yaml b/third-places/Service/third-places.yaml new file mode 100644 index 0000000..6b01a7b --- /dev/null +++ b/third-places/Service/third-places.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: application + app.kubernetes.io/instance: third-places + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: third-places + app.kubernetes.io/version: 0.1.2 + helm.sh/chart: third-places-0.1.0 + name: third-places + namespace: third-places +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: http + selector: + app.kubernetes.io/component: application + app.kubernetes.io/instance: third-places + app.kubernetes.io/name: third-places + type: ClusterIP diff --git a/third-places/StatefulSet/third-places-postgresql.yaml b/third-places/StatefulSet/third-places-postgresql.yaml new file mode 100644 index 0000000..799f945 --- /dev/null +++ b/third-places/StatefulSet/third-places-postgresql.yaml @@ -0,0 +1,59 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + labels: + app.kubernetes.io/component: postgresql + app.kubernetes.io/instance: third-places + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: third-places + app.kubernetes.io/version: 0.1.2 + helm.sh/chart: third-places-0.1.0 + name: third-places-postgresql + namespace: third-places +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/component: postgresql + app.kubernetes.io/instance: third-places + app.kubernetes.io/name: third-places + serviceName: postgresql + template: + metadata: + labels: + app.kubernetes.io/component: postgresql + app.kubernetes.io/instance: third-places + app.kubernetes.io/name: third-places + spec: + containers: + - envFrom: + - secretRef: + name: postgresql + image: 'postgres:13' + livenessProbe: + initialDelaySeconds: 15 + periodSeconds: 20 + tcpSocket: + port: 5432 + name: postgresql + ports: + - containerPort: 5432 + name: postgresql + readinessProbe: + initialDelaySeconds: 5 + periodSeconds: 10 + tcpSocket: + port: 5432 + volumeMounts: + - mountPath: /var/lib/postgresql/data + name: data + subPath: postgresql-data + volumeClaimTemplates: + - metadata: + name: data + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 5Gi