update build branch
parent
96b108d5c2
commit
c2570694ce
|
@ -0,0 +1,58 @@
|
|||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: pg
|
||||
spec:
|
||||
replicas: 1
|
||||
serviceName: pg
|
||||
selector:
|
||||
matchLabels:
|
||||
app: pg
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: pg
|
||||
spec:
|
||||
containers:
|
||||
- name: pg
|
||||
image: postgres:14
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
volumeMounts:
|
||||
- name: pg_data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
value: "sonar"
|
||||
- name: POSTGRES_PASSWORD
|
||||
value: "sonar"
|
||||
- name: POSTGRES_DB
|
||||
value: "sonar"
|
||||
volumes:
|
||||
- name: pg_data
|
||||
hostPath:
|
||||
path: /data/sonarqube/postgresql/data
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: "kubernetes.io/hostname"
|
||||
operator: In
|
||||
values:
|
||||
- bfs-k8snode-10-2-0-14.hetzner.base.beaconfireinc.com
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: pg
|
||||
labels:
|
||||
app: pg
|
||||
spec:
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 5432
|
||||
targetPort: 5432
|
||||
selector:
|
||||
app: pg
|
||||
type: ClusterIP
|
|
@ -0,0 +1,71 @@
|
|||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: sonarqube
|
||||
spec:
|
||||
replicas: 1
|
||||
serviceName: sonarqube
|
||||
selector:
|
||||
matchLabels:
|
||||
app: sonarqube
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: sonarqube
|
||||
spec:
|
||||
containers:
|
||||
- name: sonarqube
|
||||
image: sonarqube:10.3-community
|
||||
env:
|
||||
- name: SONAR_JDBC_URL
|
||||
value: jdbc:postgresql://db:5432/sonar
|
||||
- name: SONAR_JDBC_USERNAME
|
||||
value: sonar
|
||||
- name: SONAR_JDBC_PASSWORD
|
||||
value: sonar
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 9000
|
||||
protocol: TCP
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- name: sonarqube-data
|
||||
mountPath: /opt/sonarqube/data
|
||||
- name: sonarqube-logs
|
||||
mountPath: /opt/sonarqube/logs
|
||||
- name: sonarqube-extensions
|
||||
mountPath: /opt/sonarqube/extensions
|
||||
volumes:
|
||||
- name: sonarqube-data
|
||||
hostPath:
|
||||
path: /data/sonarqube/sonarqube/data
|
||||
- name: sonarqube-logs
|
||||
hostPath:
|
||||
path: /data/sonarqube/sonarqube/logs
|
||||
- name: sonarqube-extensions
|
||||
hostPath:
|
||||
path: /data/sonarqube/sonarqube/extensions
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: "kubernetes.io/hostname"
|
||||
operator: In
|
||||
values:
|
||||
- bfs-k8snode-10-2-0-14.hetzner.base.beaconfireinc.com
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: sonarqube
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: 9000
|
||||
targetPort: http
|
||||
selector:
|
||||
app: sonarqube
|
Loading…
Reference in New Issue