diff --git a/dev-upgrade/mysql/mysql-dev.yaml b/dev-upgrade/mysql/mysql.yaml similarity index 100% rename from dev-upgrade/mysql/mysql-dev.yaml rename to dev-upgrade/mysql/mysql.yaml diff --git a/dev-upgrade/pg/pg.yaml b/dev-upgrade/pg/pg.yaml new file mode 100644 index 0000000..00e3465 --- /dev/null +++ b/dev-upgrade/pg/pg.yaml @@ -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 \ No newline at end of file diff --git a/dev-upgrade/redis/redis-stack-dev.yaml b/dev-upgrade/redis/redis-stack.yaml similarity index 100% rename from dev-upgrade/redis/redis-stack-dev.yaml rename to dev-upgrade/redis/redis-stack.yaml diff --git a/dev-upgrade/redis/redis-dev.yaml b/dev-upgrade/redis/redis.yaml similarity index 100% rename from dev-upgrade/redis/redis-dev.yaml rename to dev-upgrade/redis/redis.yaml diff --git a/dev-upgrade/sonarqube/sonarqube.yaml b/dev-upgrade/sonarqube/sonarqube.yaml new file mode 100644 index 0000000..ecef90f --- /dev/null +++ b/dev-upgrade/sonarqube/sonarqube.yaml @@ -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 \ No newline at end of file