You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
1.9 KiB

2 years ago
---
apiVersion: v1
kind: Service
metadata:
name: gitlab
spec:
selector:
pod: gitlab
ports:
- protocol: TCP
port: 80
targetPort: 80
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: gitlab-pvc
labels:
pod: gitlab
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitlab
spec:
replicas: 1
selector:
matchLabels:
pod: gitlab
template:
metadata:
labels:
pod: gitlab
spec:
containers:
- name: gitlab
image: gitlab/gitlab-ce
imagePullPolicy: IfNotPresent
env:
- name: GITLAB_OMNIBUS_CONFIG
value: |
postgresql['enable'] = false
prometheus['monitor_kubernetes'] = false
gitlab_rails['db_username'] = "gitlab"
gitlab_rails['db_password'] = "gitlab"
gitlab_rails['db_host'] = "gitlab-db"
gitlab_rails['db_port'] = "5432"
gitlab_rails['db_database'] = "gitlabhq_production"
gitlab_rails['db_adapter'] = 'postgresql'
gitlab_rails['db_encoding'] = 'utf8'
redis['enable'] = false
gitlab_rails['redis_host'] = 'gitlab-memcache'
gitlab_rails['redis_port'] = '6379'
gitlab_rails['gitlab_shell_ssh_port'] = 22
gitlab_rails['initial_root_password'] = '12345678'
ports:
- containerPort: 80
volumeMounts:
- name: gitlab
mountPath: /var/opt/gitlab
subPath: gitlab_data
- name: gitlab
mountPath: /etc/gitlab
subPath: gitlab_configuration
volumes:
- name: gitlab
persistentVolumeClaim:
claimName: gitlab-pvc