diff --git a/README.md b/README.md index 192b44d..3837aa7 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ And you are set to create your first secret using this operator. For that you ne ```yaml --- -apiVersion: "lerentis.uploadfilter24.eu/v1beta4" +apiVersion: "lerentis.uploadfilter24.eu/v1beta5" kind: BitwardenSecret metadata: name: name-of-your-management-object @@ -73,6 +73,8 @@ spec: id: "A Secret ID from bitwarden" name: "Name of the secret to be created" namespace: "Namespace of the secret to be created" + labels: # Optional + key: value ``` The ID can be extracted from the browser when you open a item the ID is in the URL. The resulting secret looks something like this: @@ -87,6 +89,8 @@ metadata: annotations: managed: bitwarden-secrets.lerentis.uploadfilter24.eu managedObject: bw-operator/test + labels: + key: value name: name-of-your-management-object namespace: default type: Opaque @@ -98,7 +102,7 @@ For managing registry credentials, or pull secrets, you can create another kind ```yaml --- -apiVersion: "lerentis.uploadfilter24.eu/v1beta4" +apiVersion: "lerentis.uploadfilter24.eu/v1beta5" kind: RegistryCredential metadata: name: name-of-your-management-object @@ -109,6 +113,8 @@ spec: id: "A Secret ID from bitwarden" name: "Name of the secret to be created" namespace: "Namespace of the secret to be created" + labels: # Optional + key: value ``` The resulting secret looks something like this: @@ -122,6 +128,8 @@ metadata: annotations: managed: bitwarden-secrets.lerentis.uploadfilter24.eu managedObject: bw-operator/test + labels: + key: value name: name-of-your-management-object namespace: default type: dockerconfigjson @@ -133,7 +141,7 @@ One of the more freely defined types that can be used with this operator you can ```yaml --- -apiVersion: "lerentis.uploadfilter24.eu/v1beta4" +apiVersion: "lerentis.uploadfilter24.eu/v1beta5" kind: BitwardenTemplate metadata: name: name-of-your-management-object @@ -141,6 +149,8 @@ spec: filename: "Key of the secret to be created" name: "Name of the secret to be created" namespace: "Namespace of the secret to be created" + labels: # Optional + key: value template: | --- api: @@ -164,6 +174,8 @@ metadata: annotations: managed: bitwarden-template.lerentis.uploadfilter24.eu managedObject: namespace/name-of-your-management-object + labels: + key: value name: Name of the secret to be created namespace: Namespace of the secret to be created type: Opaque diff --git a/charts/bitwarden-crd-operator/crds/bitwarden-secrets.yaml b/charts/bitwarden-crd-operator/crds/bitwarden-secrets.yaml index 3a3dc57..52eb23d 100644 --- a/charts/bitwarden-crd-operator/crds/bitwarden-secrets.yaml +++ b/charts/bitwarden-crd-operator/crds/bitwarden-secrets.yaml @@ -14,8 +14,9 @@ spec: - bws versions: - name: v1beta4 - served: false - storage: true + served: true + storage: false + deprecated: true schema: openAPIV3Schema: type: object @@ -82,21 +83,8 @@ spec: name: type: string labels: - type: array - items: - type: object - properties: - json: - x-kubernetes-preserve-unknown-fields: true - type: object - properties: - spec: - type: object - properties: - foo: - type: string - bar: - type: string + type: object + x-kubernetes-preserve-unknown-fields: true required: - id - namespace diff --git a/charts/bitwarden-crd-operator/crds/bitwarden-templates.yaml b/charts/bitwarden-crd-operator/crds/bitwarden-templates.yaml index 1dff2f7..c85bcc5 100644 --- a/charts/bitwarden-crd-operator/crds/bitwarden-templates.yaml +++ b/charts/bitwarden-crd-operator/crds/bitwarden-templates.yaml @@ -14,8 +14,9 @@ spec: - bwt versions: - name: v1beta4 - served: false - storage: true + served: true + storage: false + deprecated: true schema: openAPIV3Schema: type: object @@ -55,21 +56,8 @@ spec: name: type: string labels: - type: array - items: - type: object - properties: - json: - x-kubernetes-preserve-unknown-fields: true - type: object - properties: - spec: - type: object - properties: - foo: - type: string - bar: - type: string + type: object + x-kubernetes-preserve-unknown-fields: true required: - filename - template diff --git a/charts/bitwarden-crd-operator/crds/registry-credentials.yaml b/charts/bitwarden-crd-operator/crds/registry-credentials.yaml index 12d7c67..80cf6dc 100644 --- a/charts/bitwarden-crd-operator/crds/registry-credentials.yaml +++ b/charts/bitwarden-crd-operator/crds/registry-credentials.yaml @@ -14,8 +14,9 @@ spec: - rgc versions: - name: v1beta4 - served: false - storage: true + served: true + storage: false + deprecated: true schema: openAPIV3Schema: type: object @@ -65,21 +66,8 @@ spec: name: type: string labels: - type: array - items: - type: object - properties: - json: - x-kubernetes-preserve-unknown-fields: true - type: object - properties: - spec: - type: object - properties: - foo: - type: string - bar: - type: string + type: object + x-kubernetes-preserve-unknown-fields: true required: - id - namespace diff --git a/example.yaml b/example.yaml index 881ca49..3de4bd3 100644 --- a/example.yaml +++ b/example.yaml @@ -17,7 +17,8 @@ spec: name: "test-secret" namespace: "default" labels: - - key: value + key: value + app: example-app --- apiVersion: "lerentis.uploadfilter24.eu/v1beta5" kind: BitwardenSecret @@ -31,6 +32,4 @@ spec: secretScope: fields id: "466fc4b0-ffca-4444-8d88-b59d4de3d928" name: "test-scope" - namespace: "default" - labels: - - key: value \ No newline at end of file + namespace: "default" \ No newline at end of file diff --git a/example_dockerlogin.yaml b/example_dockerlogin.yaml index f5f12d0..3df8a96 100644 --- a/example_dockerlogin.yaml +++ b/example_dockerlogin.yaml @@ -1,5 +1,5 @@ --- -apiVersion: "lerentis.uploadfilter24.eu/v1beta4" +apiVersion: "lerentis.uploadfilter24.eu/v1beta5" kind: RegistryCredential metadata: name: test @@ -9,4 +9,7 @@ spec: registry: "docker.io" id: "3b249ec7-9ce7-440a-9558-f34f3ab10680" name: "test-regcred" - namespace: "default" \ No newline at end of file + namespace: "default" + labels: + namespace: default + tenant: example-team \ No newline at end of file diff --git a/example_template.yaml b/example_template.yaml index 646dc4a..b159d32 100644 --- a/example_template.yaml +++ b/example_template.yaml @@ -1,5 +1,5 @@ --- -apiVersion: "lerentis.uploadfilter24.eu/v1beta4" +apiVersion: "lerentis.uploadfilter24.eu/v1beta5" kind: BitwardenTemplate metadata: name: test @@ -7,6 +7,9 @@ spec: filename: "config.yaml" name: "test-template" namespace: "default" + labels: + key: value + app: example-app template: | --- api: