free-key-value-definition #1
@ -35,7 +35,15 @@ def bitwarden_signin(logger, **kwargs):
|
||||
@kopf.on.create('bitwarden-secrets.lerentis.uploadfilter24.eu')
|
||||
def create_fn(spec, name, namespace, logger, **kwargs):
|
||||
|
||||
type = spec.get('type')
|
||||
scope = spec.get('scope')
|
||||
items = []
|
||||
for index in range(len(scope)):
|
||||
for element in scope[index]:
|
||||
logger.info(f"Type: {type(element)}")
|
||||
for test in element:
|
||||
logger.info(f"Key: {test}")
|
||||
|
||||
|
||||
id = spec.get('id')
|
||||
secret_name = spec.get('name')
|
||||
secret_namespace = spec.get('namespace')
|
||||
|
@ -12,7 +12,7 @@ spec:
|
||||
shortNames:
|
||||
- bws
|
||||
versions:
|
||||
- name: v1beta1
|
||||
- name: v1beta2
|
||||
served: true
|
||||
storage: true
|
||||
schema:
|
||||
@ -22,12 +22,27 @@ spec:
|
||||
spec:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
scope:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
element:
|
||||
type: object
|
||||
properties:
|
||||
secretName:
|
||||
type: string
|
||||
secretRef:
|
||||
type: string
|
||||
required:
|
||||
- secretName
|
||||
id:
|
||||
type: string
|
||||
namespace:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
|
||||
required:
|
||||
- id
|
||||
- namespace
|
||||
- name
|
||||
|
12
example.yaml
12
example.yaml
@ -1,10 +1,16 @@
|
||||
---
|
||||
apiVersion: "lerentis.uploadfilter24.eu/v1beta1"
|
||||
apiVersion: "lerentis.uploadfilter24.eu/v1beta2"
|
||||
kind: BitwardenSecret
|
||||
metadata:
|
||||
name: test
|
||||
spec:
|
||||
type: "password"
|
||||
id: "123456"
|
||||
scope:
|
||||
- element:
|
||||
secretName: username
|
||||
secretRef: nameofUser
|
||||
- element:
|
||||
secretName: password
|
||||
secretRef: passwordOfUser
|
||||
id: "88781348-c81c-4367-9801-550360c21295"
|
||||
name: "test-secret"
|
||||
namespace: "default"
|
Loading…
Reference in New Issue
Block a user