crd matching for bitwardenSecret

This commit is contained in:
Tobias Trabelsi 2025-03-19 22:27:44 +01:00
parent fbfe7b9986
commit ce3a6dfc6d
Signed by: lerentis
GPG Key ID: FF0C2839718CAF2E
4 changed files with 81 additions and 11 deletions

View File

@ -28,11 +28,19 @@ import (
// BitwardenSecretSpec defines the desired state of BitwardenSecret. // BitwardenSecretSpec defines the desired state of BitwardenSecret.
type BitwardenSecretSpec struct { type BitwardenSecretSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster Content []Element `json:"content"`
// Important: Run "make" to regenerate code after modifying this file ID string `json:"id"`
Name string `json:"name"`
Namespace string `json:"namespace,omitempty"`
SecretType string `json:"secretType,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
}
// Foo is an example field of BitwardenSecret. Edit bitwardensecret_types.go to remove/update type Element struct {
Foo string `json:"foo,omitempty"` SecretName string `json:"secretName"`
SecretRef string `json:"secretRef"`
SecretScope string `json:"secretScope"`
} }
// BitwardenSecretStatus defines the observed state of BitwardenSecret. // BitwardenSecretStatus defines the observed state of BitwardenSecret.

View File

@ -33,7 +33,7 @@ func (in *BitwardenSecret) DeepCopyInto(out *BitwardenSecret) {
*out = *in *out = *in
out.TypeMeta = in.TypeMeta out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
out.Spec = in.Spec in.Spec.DeepCopyInto(&out.Spec)
out.Status = in.Status out.Status = in.Status
} }
@ -90,6 +90,25 @@ func (in *BitwardenSecretList) DeepCopyObject() runtime.Object {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *BitwardenSecretSpec) DeepCopyInto(out *BitwardenSecretSpec) { func (in *BitwardenSecretSpec) DeepCopyInto(out *BitwardenSecretSpec) {
*out = *in *out = *in
if in.Content != nil {
in, out := &in.Content, &out.Content
*out = make([]Element, len(*in))
copy(*out, *in)
}
if in.Labels != nil {
in, out := &in.Labels, &out.Labels
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.Annotations != nil {
in, out := &in.Annotations, &out.Annotations
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
} }
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BitwardenSecretSpec. // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BitwardenSecretSpec.
@ -206,6 +225,21 @@ func (in *BitwardenTemplateStatus) DeepCopy() *BitwardenTemplateStatus {
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Element) DeepCopyInto(out *Element) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Element.
func (in *Element) DeepCopy() *Element {
if in == nil {
return nil
}
out := new(Element)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RegistryCredential) DeepCopyInto(out *RegistryCredential) { func (in *RegistryCredential) DeepCopyInto(out *RegistryCredential) {
*out = *in *out = *in

View File

@ -39,10 +39,41 @@ spec:
spec: spec:
description: BitwardenSecretSpec defines the desired state of BitwardenSecret. description: BitwardenSecretSpec defines the desired state of BitwardenSecret.
properties: properties:
foo: annotations:
description: Foo is an example field of BitwardenSecret. Edit bitwardensecret_types.go additionalProperties:
to remove/update type: string
type: object
content:
items:
properties:
secretName:
type: string
secretRef:
type: string
secretScope:
type: string
required:
- secretName
- secretRef
- secretScope
type: object
type: array
id:
type: string type: string
labels:
additionalProperties:
type: string
type: object
name:
type: string
namespace:
type: string
secretType:
type: string
required:
- content
- id
- name
type: object type: object
status: status:
description: BitwardenSecretStatus defines the observed state of BitwardenSecret. description: BitwardenSecretStatus defines the observed state of BitwardenSecret.

View File

@ -7,7 +7,6 @@ rules:
- apiGroups: - apiGroups:
- lerentis.uploadfilter24.eu.lerentis.uploadfilter24.eu - lerentis.uploadfilter24.eu.lerentis.uploadfilter24.eu
resources: resources:
- bitwardensecrets
- bitwardentemplates - bitwardentemplates
- registrycredentials - registrycredentials
verbs: verbs:
@ -21,7 +20,6 @@ rules:
- apiGroups: - apiGroups:
- lerentis.uploadfilter24.eu.lerentis.uploadfilter24.eu - lerentis.uploadfilter24.eu.lerentis.uploadfilter24.eu
resources: resources:
- bitwardensecrets/finalizers
- bitwardentemplates/finalizers - bitwardentemplates/finalizers
- registrycredentials/finalizers - registrycredentials/finalizers
verbs: verbs:
@ -29,7 +27,6 @@ rules:
- apiGroups: - apiGroups:
- lerentis.uploadfilter24.eu.lerentis.uploadfilter24.eu - lerentis.uploadfilter24.eu.lerentis.uploadfilter24.eu
resources: resources:
- bitwardensecrets/status
- bitwardentemplates/status - bitwardentemplates/status
- registrycredentials/status - registrycredentials/status
verbs: verbs: