Skip to content

Commit

Permalink
Merge pull request #250 from bank-vaults/k8s.io/utils/ptr
Browse files Browse the repository at this point in the history
chore: switch to k8s.io/utils/ptr
  • Loading branch information
akijakya authored Nov 2, 2023
2 parents 38cc62a + f26de73 commit 9b5617f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions pkg/apis/vault/v1alpha1/vault_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
netv1 "k8s.io/api/networking/v1"
extv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/utils/pointer"
"k8s.io/utils/ptr"
ctrl "sigs.k8s.io/controller-runtime"
)

Expand Down Expand Up @@ -1037,7 +1037,7 @@ func (vault *Vault) AsOwnerReference() metav1.OwnerReference {
Kind: vault.Kind,
Name: vault.Name,
UID: vault.UID,
Controller: pointer.Bool(true),
Controller: ptr.To(true),
}
}

Expand Down
14 changes: 7 additions & 7 deletions pkg/controller/vault/vault_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/utils/pointer"
"k8s.io/utils/ptr"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller"
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
Expand Down Expand Up @@ -913,7 +913,7 @@ func deploymentForConfigurer(v *vaultv1alpha1.Vault, configmaps corev1.ConfigMap

podSpec := corev1.PodSpec{
ServiceAccountName: v.Spec.GetServiceAccount(),
AutomountServiceAccountToken: pointer.Bool(true),
AutomountServiceAccountToken: ptr.To(true),

Containers: []corev1.Container{
{
Expand Down Expand Up @@ -959,7 +959,7 @@ func deploymentForConfigurer(v *vaultv1alpha1.Vault, configmaps corev1.ConfigMap
Selector: &metav1.LabelSelector{
MatchLabels: ls,
},
RevisionHistoryLimit: pointer.Int32(0),
RevisionHistoryLimit: ptr.To(int32(0)),
Template: corev1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: withVaultConfigurerLabels(v, ls),
Expand Down Expand Up @@ -1266,8 +1266,8 @@ func statefulSetForVault(v *vaultv1alpha1.Vault, externalSecretsToWatchItems []c
VolumeMounts: withHSMVolumeMount(v, nil),
Resources: getHSMDaemonResource(v),
SecurityContext: &corev1.SecurityContext{
Privileged: pointer.Bool(true),
RunAsUser: pointer.Int64(0),
Privileged: ptr.To(true),
RunAsUser: ptr.To(int64(0)),
},
})
}
Expand All @@ -1285,7 +1285,7 @@ func statefulSetForVault(v *vaultv1alpha1.Vault, externalSecretsToWatchItems []c
Affinity: affinity,

ServiceAccountName: v.Spec.GetServiceAccount(),
AutomountServiceAccountToken: pointer.Bool(true),
AutomountServiceAccountToken: ptr.To(true),

InitContainers: withVaultInitContainers(v, []corev1.Container{
{
Expand Down Expand Up @@ -1676,7 +1676,7 @@ func withVeleroContainer(v *vaultv1alpha1.Vault, containers []corev1.Container)
Command: []string{"/bin/bash", "-c", "sleep infinity"},
VolumeMounts: withVaultVolumeMounts(v, nil),
SecurityContext: &corev1.SecurityContext{
Privileged: pointer.Bool(true),
Privileged: ptr.To(true),
},
Resources: corev1.ResourceRequirements{
Requests: corev1.ResourceList{
Expand Down

0 comments on commit 9b5617f

Please sign in to comment.