imfreedom/k8s-cluster

Parents b380be712b3d
Children 190e9257dad3
Replace the whole bamboo manifest with it's existing cert and a dummy ingress that redirects to ci.imfreedom.org
--- a/50-bamboo.pidgin.im.yaml Fri Nov 08 03:45:21 2019 -0600
+++ b/50-bamboo.pidgin.im.yaml Fri Nov 08 03:48:24 2019 -0600
@@ -1,127 +1,6 @@
-# This manifest deploys bamboo and postgres for it.
-#
-# Postgres is comprised of a service, a deployment (1 replica), a persistent
-# volume claim (1Gi), and a secret which is contained elsewhere.
-#
-# Bamboo is comprised of a certificate, an ingress, two services (http, agent),
-# a deployment, and a persistent volume claim (5Gi). The ingress points to the
-# http service, while a separate configuration is (90-ingress.yaml) points to
-# the agent service.
----
-apiVersion: v1
-kind: Service
-metadata:
- namespace: pidgin
- name: bamboo-postgres
- labels:
- app: bamboo
- role: postgres
-spec:
- ports:
- - port: 5432
- protocol: TCP
- selector:
- app: bamboo
- role: postgres
----
-apiVersion: networking.k8s.io/v1
-kind: NetworkPolicy
-metadata:
- namespace: pidgin
- name: bamboo-postgres
- labels:
- app: bamboo
- role: postgres
-spec:
- podSelector:
- matchLabels:
- app: bamboo
- role: postgres
- ingress:
- - from:
- - podSelector:
- matchLabels:
- app: bamboo
- role: app
- ports:
- - port: 5432
- protocol: TCP
----
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- namespace: pidgin
- name: bamboo-postgres
- labels:
- app: bamboo
- role: postgres
-spec:
- replicas: 1
- selector:
- matchLabels:
- app: bamboo
- role: postgres
- strategy:
- type: Recreate
- template:
- metadata:
- labels:
- app: bamboo
- role: postgres
- spec:
- containers:
- - name: postgres
- image: postgres:9.6
- imagePullPolicy: Always
- env:
- - name: POSTGRES_USER
- valueFrom:
- secretKeyRef:
- name: bamboo-postgres
- key: username
- - name: POSTGRES_PASSWORD
- valueFrom:
- secretKeyRef:
- name: bamboo-postgres
- key: password
- - name: POSTGRES_DB
- valueFrom:
- secretKeyRef:
- name: bamboo-postgres
- key: db
- resources:
- limits:
- cpu: 200m
- memory: 256Mi
- requests:
- cpu: 100m
- memory: 128Mi
- ports:
- - containerPort: 5432
- volumeMounts:
- - mountPath: /var/lib/postgresql/data
- name: bamboo-postgres
- readOnly: false
- subPath: postgresql
- volumes:
- - name: bamboo-postgres
- persistentVolumeClaim:
- claimName: bamboo-postgres
----
-apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
- namespace: pidgin
- name: bamboo-postgres
- labels:
- app: bamboo
- role: postgres
-spec:
- accessModes:
- - ReadWriteOnce
- resources:
- requests:
- storage: 1Gi
+# This manifest is the remains of the bamboo deployment we once had. It is now
+# just an certificate and an ingress that redirects to the new
+# https://ci.imfreedom.org/.
---
apiVersion: extensions/v1beta1
kind: Ingress
@@ -130,83 +9,17 @@
name: bamboo
annotations:
certmanager.k8s.io/issuer: letsencrypt
- nginx.ingress.kubernetes.io/proxy-body-size: 16m
+ nginx.ingress.kubernetes.io/permanent-redirect: https://ci.imfreedom.org/
labels:
app: bamboo
spec:
rules:
- host: bamboo.pidgin.im
- http:
- paths:
- - backend:
- serviceName: bamboo-http
- servicePort: 8085
- path: /
tls:
- hosts:
- bamboo.pidgin.im
secretName: bamboo-tls
---
-apiVersion: v1
-kind: Service
-metadata:
- namespace: pidgin
- name: bamboo-http
- labels:
- app: bamboo
- role: http
-spec:
- ports:
- - port: 8085
- protocol: TCP
- selector:
- app: bamboo
- role: app
----
-apiVersion: v1
-kind: Service
-metadata:
- namespace: pidgin
- name: bamboo-agent
- labels:
- app: bamboo
- role: agent
-spec:
- ports:
- - port: 54663
- protocol: TCP
- selector:
- app: bamboo
- role: app
----
-apiVersion: networking.k8s.io/v1
-kind: NetworkPolicy
-metadata:
- namespace: pidgin
- name: bamboo
- labels:
- app: bamboo
- role: app
-spec:
- podSelector:
- matchLabels:
- app: bamboo
- role: app
- ingress:
- - from:
- - namespaceSelector:
- matchLabels:
- name: kube-public
- podSelector:
- matchLabels:
- app: ingress
- role: controller
- ports:
- - port: 8085
- protocol: TCP
- - port: 54663
- protocol: TCP
----
apiVersion: certmanager.k8s.io/v1alpha1
kind: Certificate
metadata:
@@ -226,71 +39,4 @@
domains:
- bamboo.pidgin.im
---
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- namespace: pidgin
- name: bamboo
- labels:
- app: bamboo
-spec:
- replicas: 1
- selector:
- matchLabels:
- app: bamboo
- role: app
- strategy:
- type: Recreate
- template:
- metadata:
- labels:
- app: bamboo
- role: app
- spec:
- containers:
- - name: bamboo
- image: rwgrim/atlassian-bamboo:latest
- imagePullPolicy: Always
- env:
- - name: BAMBOO_SCHEME
- value: https
- - name: BAMBOO_PROXY_NAME
- value: bamboo.pidgin.im
- - name: BAMBOO_PROXY_PORT
- value: "443"
- ports:
- - containerPort: 8085
- - containerPort: 54663
- resources:
- limits:
- cpu: 1
- memory: 2048Mi
- requests:
- cpu: 500m
- memory: 1024Mi
- volumeMounts:
- - mountPath: /bamboo
- name: bamboo
- readOnly: false
- securityContext:
- fsGroup: 1000
- runAsUser: 1000
- volumes:
- - name: bamboo
- persistentVolumeClaim:
- claimName: bamboo
----
-apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
- namespace: pidgin
- name: bamboo
- labels:
- app: bamboo
-spec:
- accessModes:
- - ReadWriteOnce
- resources:
- requests:
- storage: 10Gi
----
+