imfreedom/k8s-cluster

7e064bbac852
Parents cb3b4fbc9980
Children b83582867b78
Move 50-issues.imfreedom.org to kustomize
--- a/50-issues.imfreedom.org.yaml Thu Jun 17 03:00:17 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,198 +0,0 @@
-# youtrack is an issue tracker from jetbrains. It supports multiple projects,
-# integrates into hub, and supports importing from multiple issue trackers.
----
-apiVersion: traefik.containo.us/v1alpha1
-kind: IngressRoute
-metadata:
- name: issues-http
- namespace: imfreedom
-spec:
- entryPoints:
- - http
- routes:
- - match: Host(`issues.imfreedom.org`)
- kind: Rule
- services:
- - name: issues
- port: 8080
- middlewares:
- - name: https-redirect
----
-apiVersion: traefik.containo.us/v1alpha1
-kind: Middleware
-metadata:
- name: issues-body-size
- namespace: imfreedom
-spec:
- buffering:
- maxRequestBodyBytes: 16777216
- memRequestBodyBytes: 209715
----
-apiVersion: traefik.containo.us/v1alpha1
-kind: IngressRoute
-metadata:
- name: issues
- namespace: imfreedom
-spec:
- entryPoints:
- - https
- routes:
- - match: Host(`issues.imfreedom.org`)
- kind: Rule
- services:
- - name: issues
- port: 8080
- middlewares:
- - name: issues-body-size
- - name: common-headers
- - name: hsts-headers
- tls:
- secretName: issues-tls
----
-apiVersion: cert-manager.io/v1alpha2
-kind: Certificate
-metadata:
- namespace: imfreedom
- name: issues-tls
-spec:
- secretName: issues-tls
- issuerRef:
- name: letsencrypt
- commonName: issues.imfreedom.org
- dnsNames:
- - issues.imfreedom.org
----
-apiVersion: v1
-kind: Service
-metadata:
- namespace: imfreedom
- labels:
- app: issues
- role: app
- name: issues
-spec:
- ports:
- - port: 8080
- protocol: TCP
- selector:
- app: issues
- role: app
----
-apiVersion: networking.k8s.io/v1
-kind: NetworkPolicy
-metadata:
- namespace: imfreedom
- name: issues
- labels:
- app: issues
- role: app
-spec:
- podSelector:
- matchLabels:
- app: issues
- role: app
- ingress:
- - from:
- - namespaceSelector:
- matchLabels:
- name: kube-public
- podSelector:
- matchLabels:
- app: traefik
- role: controller
- ports:
- - port: 8080
- protocol: TCP
----
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- namespace: imfreedom
- name: issues
- labels:
- app: issues
- role: app
-spec:
- replicas: 1
- selector:
- matchLabels:
- app: issues
- role: app
- strategy:
- type: Recreate
- template:
- metadata:
- labels:
- app: issues
- role: app
- spec:
- containers:
- - name: youtrack
- image: docker.io/jetbrains/youtrack:2021.2.17047
- ports:
- - containerPort: 8080
- resources:
- limits:
- cpu: 1000m
- memory: 2048Mi
- requests:
- cpu: 500m
- memory: 1024Mi
- volumeMounts:
- - mountPath: /opt/youtrack/data
- name: datadir
- readOnly: false
- subPath: data
- - mountPath: /opt/youtrack/conf
- name: datadir
- readOnly: false
- subPath: conf
- - mountPath: /opt/youtrack/logs/
- name: hostdir
- readOnly: false
- subPath: logs
- - mountPath: /opt/youtrack/backups/
- name: datadir
- readOnly: false
- subPath: backups
- - mountPath: /opt/youtrack/temp/
- name: hostdir
- readOnly: false
- subPath: temp
- securityContext:
- fsGroup: 13001
- runAsUser: 13001
- volumes:
- - name: datadir
- persistentVolumeClaim:
- claimName: issues
- - name: hostdir
- emptyDir: {}
----
-apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
- namespace: imfreedom
- name: issues
- labels:
- app: issues
- role: app
-spec:
- accessModes:
- - ReadWriteOnce
- resources:
- requests:
- storage: 10Gi
----
-apiVersion: gemini.fairwinds.com/v1beta1
-kind: SnapshotGroup
-metadata:
- namespace: imfreedom
- name: issues
-spec:
- persistentVolumeClaim:
- claimName: issues
- schedule:
- - every: 12 hours
- keep: 2
----
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/50-issues.imfreedom.org/kustomization.yaml Thu Jun 17 03:04:40 2021 -0500
@@ -0,0 +1,8 @@
+---
+namespace: imfreedom
+commonLabels:
+ app: issues
+ role: app
+resources:
+ - manifest.yaml
+---
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/50-issues.imfreedom.org/manifest.yaml Thu Jun 17 03:04:40 2021 -0500
@@ -0,0 +1,179 @@
+# youtrack is an issue tracker from jetbrains. It supports multiple projects,
+# integrates into hub, and supports importing from multiple issue trackers.
+---
+apiVersion: traefik.containo.us/v1alpha1
+kind: IngressRoute
+metadata:
+ name: issues-http
+spec:
+ entryPoints:
+ - http
+ routes:
+ - match: Host(`issues.imfreedom.org`)
+ kind: Rule
+ services:
+ - name: issues
+ port: 8080
+ middlewares:
+ - name: https-redirect
+---
+apiVersion: traefik.containo.us/v1alpha1
+kind: Middleware
+metadata:
+ name: issues-body-size
+spec:
+ buffering:
+ maxRequestBodyBytes: 16777216
+ memRequestBodyBytes: 209715
+---
+apiVersion: traefik.containo.us/v1alpha1
+kind: IngressRoute
+metadata:
+ name: issues
+spec:
+ entryPoints:
+ - https
+ routes:
+ - match: Host(`issues.imfreedom.org`)
+ kind: Rule
+ services:
+ - name: issues
+ port: 8080
+ middlewares:
+ - name: issues-body-size
+ - name: common-headers
+ - name: hsts-headers
+ tls:
+ secretName: issues-tls
+---
+apiVersion: cert-manager.io/v1alpha2
+kind: Certificate
+metadata:
+ name: issues-tls
+spec:
+ secretName: issues-tls
+ issuerRef:
+ name: letsencrypt
+ commonName: issues.imfreedom.org
+ dnsNames:
+ - issues.imfreedom.org
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: issues
+spec:
+ ports:
+ - port: 8080
+ protocol: TCP
+ selector:
+ app: issues
+ role: app
+---
+apiVersion: networking.k8s.io/v1
+kind: NetworkPolicy
+metadata:
+ name: issues
+spec:
+ podSelector:
+ matchLabels:
+ app: issues
+ role: app
+ ingress:
+ - from:
+ - namespaceSelector:
+ matchLabels:
+ name: kube-public
+ podSelector:
+ matchExpressions:
+ - key: app
+ operator: In
+ values:
+ - traefik
+ - key: role
+ operator: In
+ values:
+ - controller
+ ports:
+ - port: 8080
+ protocol: TCP
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: issues
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: issues
+ role: app
+ strategy:
+ type: Recreate
+ template:
+ spec:
+ containers:
+ - name: youtrack
+ image: docker.io/jetbrains/youtrack:2021.2.17047
+ ports:
+ - containerPort: 8080
+ resources:
+ limits:
+ cpu: 1000m
+ memory: 2048Mi
+ requests:
+ cpu: 500m
+ memory: 1024Mi
+ volumeMounts:
+ - mountPath: /opt/youtrack/data
+ name: datadir
+ readOnly: false
+ subPath: data
+ - mountPath: /opt/youtrack/conf
+ name: datadir
+ readOnly: false
+ subPath: conf
+ - mountPath: /opt/youtrack/logs/
+ name: hostdir
+ readOnly: false
+ subPath: logs
+ - mountPath: /opt/youtrack/backups/
+ name: datadir
+ readOnly: false
+ subPath: backups
+ - mountPath: /opt/youtrack/temp/
+ name: hostdir
+ readOnly: false
+ subPath: temp
+ securityContext:
+ fsGroup: 13001
+ runAsUser: 13001
+ volumes:
+ - name: datadir
+ persistentVolumeClaim:
+ claimName: issues
+ - name: hostdir
+ emptyDir: {}
+---
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+ name: issues
+spec:
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: 10Gi
+---
+apiVersion: gemini.fairwinds.com/v1beta1
+kind: SnapshotGroup
+metadata:
+ name: issues
+spec:
+ persistentVolumeClaim:
+ claimName: issues
+ schedule:
+ - every: 12 hours
+ keep: 2
+---