Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Kubernetes objects templates #86

Open
novitoll opened this issue Jan 11, 2018 · 8 comments
Open

Request: Kubernetes objects templates #86

novitoll opened this issue Jan 11, 2018 · 8 comments

Comments

@novitoll
Copy link

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)

@thinkernel
Copy link
Contributor

I'm thinking of this idea, too.
However, I've been struggling with the k8s environments for a while.

@novitoll
Copy link
Author

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

@thinkernel
Copy link
Contributor

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.

@novitoll
Copy link
Author

@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.

  • Gerrit, Sonar are using PostgreSQL pod to persist + mounted volumes are PVCs to some cloud providers, could be even hostPath if 1 node like minikube
  • Jenkins are fully automated with Groovies and gerrit-trigger as well available in DSL, pipelines

@thinkernel
Copy link
Contributor

thinkernel commented Mar 7, 2018

@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.

@NeVraX182
Copy link

@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.

@novitoll
Copy link
Author

novitoll commented Aug 3, 2018

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

@Sjnahak
Copy link

Sjnahak commented Jun 7, 2020

@novitoll any updates on this open request?
Gerrit on k8s without helm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants