mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
update k8 operator to use service account
This commit is contained in:
@@ -4,6 +4,16 @@ import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
type Authentication struct {
|
||||
ServiceAccount ServiceAccountDetails `json:"serviceAccount"`
|
||||
}
|
||||
|
||||
type ServiceAccountDetails struct {
|
||||
ServiceAccountSecretReference KubeSecretReference `json:"serviceAccountSecretReference"`
|
||||
ProjectId string `json:"projectId"`
|
||||
EnvironmentName string `json:"environmentName"`
|
||||
}
|
||||
|
||||
type KubeSecretReference struct {
|
||||
// The name of the Kubernetes Secret
|
||||
// +kubebuilder:validation:Required
|
||||
@@ -16,10 +26,14 @@ type KubeSecretReference struct {
|
||||
|
||||
// InfisicalSecretSpec defines the desired state of InfisicalSecret
|
||||
type InfisicalSecretSpec struct {
|
||||
// +kubebuilder:validation:Required
|
||||
// +kubebuilder:validation:Optional
|
||||
TokenSecretReference KubeSecretReference `json:"tokenSecretReference,omitempty"`
|
||||
|
||||
// +kubebuilder:validation:Optional
|
||||
Authentication Authentication `json:"authentication,omitempty"`
|
||||
|
||||
// +kubebuilder:validation:Required
|
||||
ManagedSecretReference KubeSecretReference `json:"managedSecretReference,omitempty"`
|
||||
ManagedSecretReference KubeSecretReference `json:"managedSecretReference"`
|
||||
|
||||
// Infisical host to pull secrets from
|
||||
HostAPI string `json:"hostAPI,omitempty"`
|
||||
|
||||
@@ -26,6 +26,22 @@ import (
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Authentication) DeepCopyInto(out *Authentication) {
|
||||
*out = *in
|
||||
out.ServiceAccount = in.ServiceAccount
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Authentication.
|
||||
func (in *Authentication) DeepCopy() *Authentication {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Authentication)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *InfisicalSecret) DeepCopyInto(out *InfisicalSecret) {
|
||||
*out = *in
|
||||
@@ -89,6 +105,7 @@ func (in *InfisicalSecretList) DeepCopyObject() runtime.Object {
|
||||
func (in *InfisicalSecretSpec) DeepCopyInto(out *InfisicalSecretSpec) {
|
||||
*out = *in
|
||||
out.TokenSecretReference = in.TokenSecretReference
|
||||
out.Authentication = in.Authentication
|
||||
out.ManagedSecretReference = in.ManagedSecretReference
|
||||
}
|
||||
|
||||
@@ -138,3 +155,19 @@ func (in *KubeSecretReference) DeepCopy() *KubeSecretReference {
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ServiceAccountDetails) DeepCopyInto(out *ServiceAccountDetails) {
|
||||
*out = *in
|
||||
out.ServiceAccountSecretReference = in.ServiceAccountSecretReference
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountDetails.
|
||||
func (in *ServiceAccountDetails) DeepCopy() *ServiceAccountDetails {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ServiceAccountDetails)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user