Skip to content

Commit d84ded3

Browse files
author
Ahmed El-Sayed
committed
improve crd docs
1 parent 1bbb44b commit d84ded3

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

api/v1alpha2/secretsync_types.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,18 @@ import (
77

88
// SecretSyncSpec
99
type SecretSyncSpec struct {
10-
// ClusterSelector specifies the label selector to match clusters with
10+
// Label selector for Clusters. The Clusters that are
11+
// selected by this will be the ones affected by this SecretSync.
12+
// It must match the Cluster labels. This field is immutable.
13+
// Label selector cannot be empty.
1114
ClusterSelector metav1.LabelSelector `json:"clusterSelector"`
1215
// SecretRef specifies the Secret to be bootstrapped to the matched clusters
1316
// Secret must be in the same namespace of the SecretSync object
1417
SecretRef v1.LocalObjectReference `json:"secretRef"`
1518
// TargetNamespace specifies the namespace which the secret should be bootstrapped in
1619
// The default value is the namespace of the referenced secret
1720
//+optional
18-
TargetNamespace string `json:"targetNamespace"`
21+
TargetNamespace string `json:"targetNamespace,omitempty"`
1922
}
2023

2124
// SecretSyncStatus secretsync object status

controllers/secretsync_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func (r *SecretSyncReconciler) Reconcile(ctx context.Context, req ctrl.Request)
168168
}
169169

170170
if err := patchHelper.Patch(ctx, &secretSync); err != nil {
171-
return ctrl.Result{}, err
171+
return ctrl.Result{}, fmt.Errorf("failed to patch object status: %w", err)
172172
}
173173

174174
if requeue {

0 commit comments

Comments
 (0)