From 4150b6c7670f7b727fd7d8606c48cc66b6f0386d Mon Sep 17 00:00:00 2001 From: Akram Ben Aissi Date: Wed, 26 Jun 2019 09:07:09 -0400 Subject: [PATCH] fixing staticcheck --- pkg/apis/jenkins/v1alpha2/jenkins_types.go | 5 ++--- .../jenkins/configuration/base/resources/pod.go | 10 ++++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/pkg/apis/jenkins/v1alpha2/jenkins_types.go b/pkg/apis/jenkins/v1alpha2/jenkins_types.go index 7f6dc21c..e2975358 100644 --- a/pkg/apis/jenkins/v1alpha2/jenkins_types.go +++ b/pkg/apis/jenkins/v1alpha2/jenkins_types.go @@ -155,13 +155,12 @@ type JenkinsMaster struct { // +optional NodeSelector map[string]string `json:"nodeSelector,omitempty"` - - // SecurityContext that applies to all the containers of the Jenkins + // SecurityContext that applies to all the containers of the Jenkins // Master. As per kubernetes specification, it can be overidden // for each container individually. // +optional // Defaults to: nil - SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"` + SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"` // List of containers belonging to the pod. // Containers cannot currently be added or removed. diff --git a/pkg/controller/jenkins/configuration/base/resources/pod.go b/pkg/controller/jenkins/configuration/base/resources/pod.go index 6fa87d22..403b7509 100644 --- a/pkg/controller/jenkins/configuration/base/resources/pod.go +++ b/pkg/controller/jenkins/configuration/base/resources/pod.go @@ -46,8 +46,6 @@ const ( slavePortName = "slavelistener" // HTTPPortInt defines Jenkins master HTTP port HTTPPortInt = 8080 - - jenkinsUserUID = int64(1000) // build in Docker image jenkins user UID ) func buildPodTypeMeta() metav1.TypeMeta { @@ -272,10 +270,10 @@ func NewJenkinsMasterPod(objectMeta metav1.ObjectMeta, jenkins *v1alpha2.Jenkins Spec: corev1.PodSpec{ ServiceAccountName: serviceAccountName, RestartPolicy: corev1.RestartPolicyNever, - SecurityContext: jenkins.Spec.Master.SecurityContext, - NodeSelector: jenkins.Spec.Master.NodeSelector, - Containers: newContainers(jenkins), - Volumes: append(GetJenkinsMasterPodBaseVolumes(jenkins), jenkins.Spec.Master.Volumes...), + SecurityContext: jenkins.Spec.Master.SecurityContext, + NodeSelector: jenkins.Spec.Master.NodeSelector, + Containers: newContainers(jenkins), + Volumes: append(GetJenkinsMasterPodBaseVolumes(jenkins), jenkins.Spec.Master.Volumes...), }, } }