Open novitoll opened 6 years ago
I'm thinking of this idea, too. However, I've been struggling with the k8s environments for a while.
OK, I can do it actually but later. The Deployment part might look like
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: gerrit
labels:
app: gerrit
spec:
replicas: 1
selector:
matchLabels:
app: gerrit
template:
metadata:
labels:
app: gerrit
spec:
containers:
- name: gerrit
image: openfrontier/gerrit:latest
imagePullPolicy: Always
envFrom:
- configMapRef:
name: env-config
- secretRef:
name: secrets
ports:
- name: gerrit-web
containerPort:
valueFrom:
configMapKeyRef:
name: value-config
key: web_port
- name: gerrit-ssh-agent
containerPort:
valueFrom:
configMapKeyRef:
name: value-config
key: ssh_agent_port
The basic deployment is just like what you wrote. Something need to be considered like the pvc, service, statefulset( or not). Also the way to map environment and secret as you wrote.
@thinkernel FYI, I've managed to get Gerrit, Jenkins with DSL declarative pipelines, Sonar integrated and running as pods in Kubernetes cluster with PVCs etc, and the full CI-CD works. I will try to make this solution public as soon as I have time for it.
hostPath
if 1 node like minikube@Novitoll I'm so glad to hear that. It'd be even better if you can share your works for others including me to reference.
@Novitoll did you find time to share that ? I was about to do the same from scratch... I can contribute by adding Nexus3 for example ! Or at least rearrange raw scripts & commands.
Sorry, was busy with work and then vac :) I will probably commit Gerrit deployment to https://github.com/helm/charts/tree/master/stable as well
@Novitoll any updates on this open request? Gerrit on k8s without helm
Please add the basic YAML templates for Deployment, Service, Secrets, PersistentVolume objects in Kubernetes (>= 1.8.2) for Gerrit.
Also Gerrit + Jenkins + SonarQube integration in k8s will be brilliant. (Helm packaging is optional)