Update the schema of CredentialIssuerConfig

- Move the current info from spec to status
- Add schema for new stuff that we will use in a future commit to status
- Regenerate the generated code
This commit is contained in:
Ryan Richard
2020-08-21 17:00:42 -07:00
parent ace01c86de
commit 6d43d7ba19
11 changed files with 333 additions and 124 deletions
+47 -14
View File
@@ -7,9 +7,16 @@
#! metadata:
#! name: credential-issuer-config
#! namespace: integration
#! spec:
#! server: https://foo
#! certificateAuthorityData: bar
#! status:
#! strategies:
#! - type: KubeClusterSigningCertificate
#! lastUpdateTime: 2020-08-21T20:08:18Z
#! status: Error
#! reason: CouldNotFetchKey
#! message: "There was an error getting the signing cert"
#! kubeConfigInfo:
#! server: https://foo
#! certificateAuthorityData: bar
---
apiVersion: apiextensions.k8s.io/v1
@@ -20,26 +27,52 @@ spec:
group: crd.pinniped.dev
versions:
#! Any changes to these schemas should also be reflected in the types.go file(s)
#! in https://github.com/suzerain-io/pinniped-api/tree/main/pkg/apis/pinniped
- name: v1alpha1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
required: [spec]
properties:
spec:
status:
type: object
required: [server, certificateAuthorityData]
properties:
server:
type: string
minLength: 1
pattern: '^https://|^http://'
certificateAuthorityData:
type: string
minLength: 1
strategies:
type: array
items:
type: object
required: [ type, status,reason, message, lastUpdateTime ]
properties:
type: #! this property is called "type"
type: string
minLength: 1
pattern: '^KubeClusterSigningCertificate$'
status:
type: string
minLength: 1
pattern: '^Success$|^Error$'
reason:
type: string
minLength: 1
pattern: '^CouldNotFetchKey$|^FetchedKey$'
message:
type: string
minLength: 1
lastUpdateTime:
type: string
format: date-time
minLength: 1
kubeConfigInfo:
type: object
required: [ server, certificateAuthorityData ]
properties:
server:
type: string
minLength: 1
pattern: '^https://|^http://'
certificateAuthorityData:
type: string
minLength: 1
scope: Namespaced
names:
plural: credentialissuerconfigs