Skip to content

Commit

Permalink
make manifest, short description, add in chart
Browse files Browse the repository at this point in the history
  • Loading branch information
brokenpip3 committed Jun 3, 2024
1 parent 8ff406b commit 7cf883f
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
6 changes: 1 addition & 5 deletions api/v1alpha2/jenkins_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,16 +387,12 @@ type JenkinsMaster struct {
// +optional
HostAliases []corev1.HostAlias `json:"hostAliases,omitempty"`

// Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request.
// Value must be non-negative integer. The value zero indicates stop immediately via
// the kill signal (no opportunity to shut down).
// If this value is nil, the default grace period will be used instead.
// The grace period is the duration in seconds after the processes running in the pod are sent
// a termination signal and the time when the processes are forcibly halted with a kill signal.
// Set this value longer than the expected cleanup time for your process.
// Defaults to 30 seconds.
// +optional
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty" protobuf:"varint,4,opt,name=terminationGracePeriodSeconds"`
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"`
}

// Service defines Kubernetes service attributes
Expand Down
1 change: 1 addition & 0 deletions chart/jenkins-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ Kubernetes native operator which fully manages Jenkins on Kubernetes
| jenkins.seedJobAgentImage | string | `""` | |
| jenkins.seedJobs | list | `[]` | |
| jenkins.serviceAccount.annotations | object | `{}` | |
| jenkins.terminationGracePeriodSecond | int | `30` | |
| jenkins.tolerations | list | `[]` | |
| jenkins.validateSecurityWarnings | bool | `false` | |
| jenkins.volumeMounts | list | `[]` | |
Expand Down
5 changes: 4 additions & 1 deletion chart/jenkins-operator/templates/jenkins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ spec:
{{- with .Values.jenkins.hostAliases }}
hostAliases: {{ toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.jenkins.terminationGracePeriodSecond }}
terminationGracePeriodSecond: {{ .Values.jenkins.terminationGracePeriodSecond }}
{{- end }}
containers:
- name: jenkins-master
image: {{ .Values.jenkins.image }}
Expand All @@ -137,7 +140,7 @@ spec:
{{- if .Values.jenkins.backup.enabled }}
- name: {{ .Values.jenkins.backup.containerName }}
image: {{ .Values.jenkins.backup.image }}
imagePullPolicy: {{ .Values.jenkins.imagePullPolicy }}
imagePullPolicy: {{ .Values.jenkins.imagePullPolicy }}
{{- with .Values.jenkins.backup.resources }}
resources: {{ toYaml . | nindent 10 }}
{{- end }}
Expand Down
4 changes: 4 additions & 0 deletions chart/jenkins-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ jenkins:
# - "foo.remote"
# - "bar.remote"

# Optional duration in seconds the pod needs to terminate gracefully.
# Default 30sec
terminationGracePeriodSecond: 30

# validateSecurityWarnings enables or disables validating potential security warnings in Jenkins plugins via admission webhooks.
validateSecurityWarnings: false

Expand Down
8 changes: 8 additions & 0 deletions config/crd/bases/jenkins.io_jenkins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1330,6 +1330,14 @@ spec:
type: string
type: object
type: object
terminationGracePeriodSeconds:
description: The grace period is the duration in seconds after
the processes running in the pod are sent a termination signal
and the time when the processes are forcibly halted with a kill
signal. Set this value longer than the expected cleanup time
for your process. Defaults to 30 seconds.
format: int64
type: integer
tolerations:
description: If specified, the pod's tolerations.
items:
Expand Down

0 comments on commit 7cf883f

Please sign in to comment.