From dd4c4e1473ecb7d8f98fc9a0ccacb7a306e693c4 Mon Sep 17 00:00:00 2001 From: Maidul Islam Date: Tue, 18 Apr 2023 16:17:32 -0700 Subject: [PATCH] make hostAPI optional --- .../api/v1alpha1/infisicalsecret_types.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/k8-operator/api/v1alpha1/infisicalsecret_types.go b/k8-operator/api/v1alpha1/infisicalsecret_types.go index e8dccdabb..96364bf86 100644 --- a/k8-operator/api/v1alpha1/infisicalsecret_types.go +++ b/k8-operator/api/v1alpha1/infisicalsecret_types.go @@ -4,13 +4,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -type Authentication struct { - // +kubebuilder:validation:Optional - ServiceAccount ServiceAccountDetails `json:"serviceAccount"` - // +kubebuilder:validation:Optional - ServiceToken ServiceTokenDetails `json:"serviceToken"` -} - type ServiceTokenDetails struct { ServiceTokenSecretReference KubeSecretReference `json:"serviceTokenSecretReference"` } @@ -21,6 +14,13 @@ type ServiceAccountDetails struct { EnvironmentName string `json:"environmentName"` } +type Authentication struct { + // +kubebuilder:validation:Optional + ServiceAccount ServiceAccountDetails `json:"serviceAccount"` + // +kubebuilder:validation:Optional + ServiceToken ServiceTokenDetails `json:"serviceToken"` +} + type KubeSecretReference struct { // The name of the Kubernetes Secret // +kubebuilder:validation:Required @@ -43,7 +43,8 @@ type InfisicalSecretSpec struct { ManagedSecretReference KubeSecretReference `json:"managedSecretReference"` // Infisical host to pull secrets from - HostAPI string `json:"hostAPI,omitempty"` + // +kubebuilder:validation:Optional + HostAPI string `json:"hostAPI"` } // InfisicalSecretStatus defines the observed state of InfisicalSecret