Skip to content

Commit

Permalink
jenkinsci#318 Fix code review issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikolaj Karebski committed Apr 3, 2020
1 parent fe74f40 commit 32ae0c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/controller/jenkins/configuration/base/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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")
Expand All @@ -94,5 +95,5 @@ func isRunningInCluster() (bool, error) {
}
return true, nil
}
return false, err
return false, stackerr.WithStack(err)
}

0 comments on commit 32ae0c5

Please sign in to comment.