mirror of
https://github.com/1Password/onepassword-operator.git
synced 2025-10-22 07:28:06 +00:00
GoFMT
This commit is contained in:
@@ -23,14 +23,13 @@ const RestartDeploymentsAnnotation = OnepasswordPrefix + "/auto-restart"
|
|||||||
|
|
||||||
var log = logf.Log
|
var log = logf.Log
|
||||||
|
|
||||||
|
|
||||||
func CreateKubernetesSecretFromItem(kubeClient kubernetesClient.Client, secretName, namespace string, item *onepassword.Item, autoRestart string, labels map[string]string, annotations map[string]string) error {
|
func CreateKubernetesSecretFromItem(kubeClient kubernetesClient.Client, secretName, namespace string, item *onepassword.Item, autoRestart string, labels map[string]string, annotations map[string]string) error {
|
||||||
|
|
||||||
itemVersion := fmt.Sprint(item.Version)
|
itemVersion := fmt.Sprint(item.Version)
|
||||||
|
|
||||||
// Remove OP Annotations if they already exist
|
// Remove OP Annotations if they already exist
|
||||||
delete(annotations,VersionAnnotation)
|
delete(annotations, VersionAnnotation)
|
||||||
delete(annotations,ItemPathAnnotation)
|
delete(annotations, ItemPathAnnotation)
|
||||||
|
|
||||||
secretAnnotations := map[string]string{
|
secretAnnotations := map[string]string{
|
||||||
VersionAnnotation: itemVersion,
|
VersionAnnotation: itemVersion,
|
||||||
@@ -78,7 +77,7 @@ func BuildKubernetesSecretFromOnePasswordItem(name, namespace string, annotation
|
|||||||
Name: name,
|
Name: name,
|
||||||
Namespace: namespace,
|
Namespace: namespace,
|
||||||
Annotations: annotations,
|
Annotations: annotations,
|
||||||
Labels: labels,
|
Labels: labels,
|
||||||
},
|
},
|
||||||
Data: BuildKubernetesSecretData(item.Fields),
|
Data: BuildKubernetesSecretData(item.Fields),
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user