diff --git a/pkg/controller/jenkins/configuration/base/reconcile.go b/pkg/controller/jenkins/configuration/base/reconcile.go index a53d124af..64cada6a2 100644 --- a/pkg/controller/jenkins/configuration/base/reconcile.go +++ b/pkg/controller/jenkins/configuration/base/reconcile.go @@ -287,7 +287,7 @@ func (r *ReconcileJenkinsBaseConfiguration) createInitConfigurationConfigMap(met func (r *ReconcileJenkinsBaseConfiguration) createBaseConfigurationConfigMap(meta metav1.ObjectMeta) error { configMap, err := resources.NewBaseConfigurationConfigMap(meta, r.Configuration.Jenkins) if err != nil { - return stackerr.WithStack(err) + return err } return stackerr.WithStack(r.CreateOrUpdateResource(configMap)) } diff --git a/pkg/controller/jenkins/configuration/base/resources/service.go b/pkg/controller/jenkins/configuration/base/resources/service.go index bbd3d328e..72b7c5511 100644 --- a/pkg/controller/jenkins/configuration/base/resources/service.go +++ b/pkg/controller/jenkins/configuration/base/resources/service.go @@ -5,6 +5,7 @@ import ( "github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2" "github.com/jenkinsci/kubernetes-operator/pkg/controller/jenkins/constants" "github.com/operator-framework/operator-sdk/pkg/k8sutil" + stackerr "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" @@ -76,7 +77,7 @@ func getClusterDomain() (string, error) { cname, err := net.LookupCNAME(apiSvc) if err != nil { - return "", err + return "", stackerr.WithStack(err) } clusterDomain = strings.TrimPrefix(cname, "kubernetes.default.svc") @@ -94,5 +95,5 @@ func isRunningInCluster() (bool, error) { } return true, nil } - return false, err + return false, stackerr.WithStack(err) } \ No newline at end of file