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