commit 6f61f454fe92bc54593c4824ee86e71afc744dc9 Author: Domagoj Zecevic Date: Tue Jul 20 14:19:08 2021 +0200 Initial commit diff --git a/dev/gitlab/deployment.yaml b/dev/gitlab/deployment.yaml new file mode 100644 index 0000000..13d9399 --- /dev/null +++ b/dev/gitlab/deployment.yaml @@ -0,0 +1,147 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: gitlab-deployment + namespace: dev-environment + labels: + app: gitlab-dev +spec: + strategy: + type: Recreate + replicas: 1 + selector: + matchLabels: + app: gitlab-dev + template: + metadata: + labels: + app: gitlab-dev + spec: + containers: + - name: gitlab + image: gitlab/gitlab-ce:14.0.5-ce.0 + resources: + requests: + memory: "2Gi" + cpu: "1" + limits: + memory: "4Gi" + cpu: "4" + ports: + - containerPort: 80 + name: gitlab-http + protocol: TCP + volumeMounts: + - mountPath: /etc/gitlab + name: gitlab-pv-config-dev + - mountPath: /var/log/gitlab + name: gitlab-pv-logs-dev + - mountPath: /var/opt/gitlab + name: gitlab-pv-data-dev + + # livenessProbe: + # failureThreshold: 3 + # httpGet: + # path: / + # port: jira-http + # scheme: HTTP + # initialDelaySeconds: 300 + # periodSeconds: 10 + # successThreshold: 1 + # timeoutSeconds: 5 + # readinessProbe: + # failureThreshold: 3 + # httpGet: + # path: / + # port: jira-http + # scheme: HTTP + # initialDelaySeconds: 300 + # periodSeconds: 10 + # successThreshold: 1 + # timeoutSeconds: 3 + volumes: + - name: gitlab-pv-config-dev + persistentVolumeClaim: + claimName: gitlab-pvc-config-dev + - name: gitlab-pv-logs-dev + persistentVolumeClaim: + claimName: gitlab-pvc-logs-dev + - name: gitlab-pv-data-dev + persistentVolumeClaim: + claimName: gitlab-pvc-data-dev +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: gitlab-pvc-config-dev + namespace: dev-environment + labels: + app: gitlab-dev +spec: + storageClassName: longhorn + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 2Gi +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: gitlab-pvc-logs-dev + namespace: dev-environment + labels: + app: gitlab-dev +spec: + storageClassName: longhorn + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 2Gi +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: gitlab-pvc-data-dev + namespace: dev-environment + labels: + app: gitlab-dev +spec: + storageClassName: longhorn + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 2Gi +--- +kind: Service +apiVersion: v1 +metadata: + namespace: dev-environment + name: gitlab-service +spec: + selector: + app: gitlab-dev + ports: + - name: gitlab-http + port: 80 + targetPort: gitlab-http + type: NodePort +--- +apiVersion: networking.k8s.io/v1beta1 +kind: Ingress +metadata: + name: gitlab-dev-ingress + namespace: dev-environment + annotations: + kubernetes.io/ingress.class: "traefik" +spec: + rules: + - host: gitlab-dev.k3s.semapp.lan + http: + paths: + - path: / + backend: + serviceName: gitlab-service + servicePort: 80 \ No newline at end of file