make hostAPI optional

This commit is contained in:
Maidul Islam
2023-04-18 16:17:32 -07:00
parent 92e04c45e7
commit dd4c4e1473

View File

@@ -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