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

Add new DevOps agent for Golang 1.16 #32

Merged
merged 1 commit into from
Oct 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions charts/ks-devops/charts/jenkins/templates/jenkins-casc-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,73 @@ data:
hostPath: "/var/data/jenkins_sonar_cache"
mountPath: "/root/.sonar/cache"
yaml: "spec:\r\n affinity:\r\n nodeAffinity:\r\n preferredDuringSchedulingIgnoredDuringExecution:\r\n - weight: 1\r\n preference:\r\n matchExpressions:\r\n - key: node-role.kubernetes.io/worker\r\n operator: In\r\n values:\r\n - ci\r\n tolerations:\r\n - key: \"node.kubernetes.io/ci\"\r\n operator: \"Exists\"\r\n effect: \"NoSchedule\"\r\n - key: \"node.kubernetes.io/ci\"\r\n operator: \"Exists\"\r\n effect: \"PreferNoSchedule\"\r\n containers:\r\n - name: \"go\"\r\n resources:\r\n requests:\r\n ephemeral-storage: \"1Gi\"\r\n limits:\r\n ephemeral-storage: \"10Gi\"\r\n securityContext:\r\n fsGroup: 1000\r\n "

- name: "go16"
namespace: "{{ .Values.Agent.WorkerNamespace }}"
label: "go16"
nodeUsageMode: "EXCLUSIVE"
idleMinutes: 0
containers:
- name: "go"
image: "{{ .Values.Agent.Builder.Registry }}/{{ .Values.Agent.Builder.golang16.image }}:{{ .Values.Agent.Builder.golang16.tag }}{{ template "jenkins.agent.variant" . }}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

golang16 -- > Golang16

command: "cat"
args: ""
ttyEnabled: true
privileged: {{ template "jenkins.agent.privileged" . }}
resourceRequestCpu: "100m"
resourceLimitCpu: "4000m"
resourceRequestMemory: "100Mi"
resourceLimitMemory: "8192Mi"
- name: "jnlp"
image: "{{ .Values.Agent.Image }}:{{ .Values.Agent.ImageTag }}"
command: "jenkins-slave"
args: "^${computer.jnlpmac} ^${computer.name}"
resourceRequestCpu: "50m"
resourceLimitCpu: "500m"
resourceRequestMemory: "400Mi"
resourceLimitMemory: "1536Mi"
workspaceVolume:
emptyDirWorkspaceVolume:
memory: false
volumes:
- hostPathVolume:
hostPath: "/var/run/docker.sock"
mountPath: "/var/run/docker.sock"
- hostPathVolume:
hostPath: "/var/data/jenkins_go_cache"
mountPath: "/home/jenkins/go/pkg"
- hostPathVolume:
hostPath: "/var/data/jenkins_sonar_cache"
mountPath: "/root/.sonar/cache"
yaml: |
spec:
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: node-role.kubernetes.io/worker
operator: In
values:
- ci
tolerations:
- key: "node.kubernetes.io/ci"
operator: "Exists"
effect: "NoSchedule"
- key: "node.kubernetes.io/ci"
operator: "Exists"
effect: "PreferNoSchedule"
containers:
- name: "go"
resources:
requests:
ephemeral-storage: "1Gi"
limits:
ephemeral-storage: "10Gi"
securityContext:
fsGroup: 1000

securityRealm:
{{- if eq .Values.securityRealm.type "ldap" }}
ldap:
Expand Down
3 changes: 3 additions & 0 deletions charts/ks-devops/charts/jenkins/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,9 @@ Agent:
Golang:
Image: builder-go
Tag: v3.1.0
golang16:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

golang16 --> Golang16

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for you patient review!

In fact, helm recommends that variable name should begin with a lowercase letter, and words should be separated with camelcase, please see https://helm.sh/docs/chart_best_practices/values/.

Meanwhile, we have plan to refine other variable names in Jenkins charts, please see issue #26 I've submitted before.


But now, I agree with you to keep the naming style of variable name same with others. I will change them later, and thank you for pointing out this again.

image: builder-go
tag: v3.2.0-alpha.01.16
ContainerRuntime: docker # Available values: docker, podman

Persistence:
Expand Down