Skip to content

Commit

Permalink
Merge pull request #29 from patoarvizu/reduce_logging
Browse files Browse the repository at this point in the history
Reduce logging
  • Loading branch information
patoarvizu authored Jul 19, 2020
2 parents 94560a8 + 268bace commit 8227702
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- run:
name: Install k3d
command: |
wget -q -O - https://raw.githubusercontent.com/rancher/k3d/v${K3D_VERSION}/install.sh | bash
wget -q -O - https://raw.githubusercontent.com/rancher/k3d/main/install.sh | TAG=v${K3D_VERSION} bash
- run:
name: Run all tests
command: |
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.1
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.2

ARG GIT_COMMIT="unspecified"
LABEL GIT_COMMIT=$GIT_COMMIT
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module github.com/patoarvizu/vault-dynamic-configuration-operator

require (
github.com/banzaicloud/bank-vaults v0.0.0-20200310211418-ce974071071b
github.com/coreos/prometheus-operator v0.34.0
github.com/operator-framework/operator-sdk v0.15.1
github.com/spf13/pflag v1.0.5
k8s.io/api v0.17.2
Expand Down
4 changes: 2 additions & 2 deletions pkg/controller/vdc/serviceaccount_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ func (r *ReconcileServiceAccount) Reconcile(request reconcile.Request) (reconcil
if val, ok := instance.Annotations[AnnotationPrefix+"/"+AutoConfigureAnnotation]; !ok || val != "true" {
return reconcile.Result{}, nil
}
reqLogger.Info("Configuring ServiceAccount for Vault authentication", "ServiceAccount", instance.ObjectMeta.Name, "Namespace", instance.ObjectMeta.Namespace)

vaultConfig := &bankvaultsv1alpha1.Vault{}
ns, _ := k8sutil.GetOperatorNamespace()
Expand Down Expand Up @@ -235,7 +234,6 @@ func (r *ReconcileServiceAccount) Reconcile(request reconcile.Request) (reconcil
if !ok {
return reconcile.Result{}, nil
}
reqLogger.Info("Configuring ServiceAccount for dynamic database secrets", "ServiceAccount", instance.ObjectMeta.Name, "Namespace", instance.ObjectMeta.Namespace, "TargetDB", targetDb)
err = addOrUpdateDBRole(&bvConfig, instance.ObjectMeta, *configMap, targetDb)
if err != nil {
return reconcile.Result{}, err
Expand Down Expand Up @@ -279,6 +277,7 @@ func addOrUpdateDBRole(bvConfig *BankVaultsConfig, metadata metav1.ObjectMeta, c
return nil
}
}
log.Info("Configuring ServiceAccount for dynamic database secrets", "ServiceAccount", metadata.Name, "Namespace", metadata.Namespace, "TargetDB", targetDb)
newDbRole := &DBRole{
Name: metadata.Name,
DbName: targetDb,
Expand Down Expand Up @@ -343,6 +342,7 @@ func addOrUpdateKubernetesRole(kubernetesAuth *Auth, metadata metav1.ObjectMeta)
return
}
}
log.Info("Configuring ServiceAccount for Vault authentication", "ServiceAccount", metadata.Name, "Namespace", metadata.Namespace)
newRole := &Role{
BoundServiceAccountNames: metadata.Name,
BoundServiceAccountNamespaces: func(namespace string) []string {
Expand Down

0 comments on commit 8227702

Please sign in to comment.