add gitlab
This commit is contained in:
1 parent
31181baf0f
commit
d48e491be9
7 files changed
+115
No files matched your search
@@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: gitlab-configmap
|
||||
data:
|
||||
GITLAB_ROOT_EMAIL: taptap.programming@gmail.com
|
||||
GITLAB_OMNIBUS_CONFIG: |
|
||||
external_url 'https://gitlab.tap-tap.win'
|
||||
nginx['listen_https'] = false
|
||||
nginx['listen_port'] = 80
|
||||
nginx['real_ip_trusted_addresses'] = [ '10.42.0.0/16', '10.43.0.0/16', '172.16.0.0/12' ]
|
||||
nginx['real_ip_header'] = 'X-Forwarded-For'
|
||||
registry_nginx['listen_https'] = false
|
||||
registry_external_url 'https://registry.tap-tap.win'
|
||||
GITLAB_REGISTRY_ENABLED: "true"
|
||||
GITLAB_REGISTRY_HOST: "registry.tap-tap.win"
|
||||
@@ -0,0 +1,43 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: gitlab-deployment
|
||||
labels:
|
||||
app: gitlab
|
||||
spec:
|
||||
replicas: 0
|
||||
selector:
|
||||
matchLabels:
|
||||
app: gitlab
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: gitlab
|
||||
spec:
|
||||
containers:
|
||||
- name: gitlab
|
||||
image: gitlab/gitlab-ce:18.11.2-ce.0
|
||||
ports:
|
||||
- containerPort: 80
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: gitlab-secret
|
||||
- configMapRef:
|
||||
name: gitlab-configmap
|
||||
volumeMounts:
|
||||
- name: gitlab-volume-config
|
||||
mountPath: /etc/gitlab
|
||||
- name: gitlab-volume-logs
|
||||
mountPath: /var/log/gitlab
|
||||
- name: gitlab-volume-data
|
||||
mountPath: /var/opt/gitlab
|
||||
volumes:
|
||||
- name: gitlab-volume-config
|
||||
hostPath:
|
||||
path: /root/kubernetes/gitlab/data/config
|
||||
- name: gitlab-volume-logs
|
||||
hostPath:
|
||||
path: /root/kubernetes/gitlab/data/logs
|
||||
- name: gitlab-volume-data
|
||||
hostPath:
|
||||
path: /root/kubernetes/gitlab/data/data
|
||||
@@ -0,0 +1,14 @@
|
||||
apiVersion: external-secrets.io/v1alpha1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: gitlab-root-password
|
||||
spec:
|
||||
secretStoreRef:
|
||||
name: vault-backend
|
||||
kind: ClusterSecretStore
|
||||
target:
|
||||
name: gitlab-root-password
|
||||
refreshPolicy: CreatedOnce
|
||||
dataFrom:
|
||||
- extract:
|
||||
key: gitlab
|
||||
@@ -0,0 +1,17 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: gitlab-ingress
|
||||
spec:
|
||||
ingressClassName: "traefik"
|
||||
rules:
|
||||
- host: gitlab.tap-tap.win
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: gitlab-service
|
||||
port:
|
||||
number: 80
|
||||
@@ -0,0 +1,10 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: gitlab
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- secret.yaml
|
||||
- configmap.yaml
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
- ingress.yaml
|
||||
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: gitlab
|
||||
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: gitlab-service
|
||||
spec:
|
||||
selector:
|
||||
app: gitlab
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
targetPort: 80
|
||||
Reference in new issue
Block a user