This repository has been archived by the owner on Jul 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 404
fix!: update crd to apiextensions.k8s.io/v1 #681
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
d9a7fcb
fix: update crd validation to conform to structural requirements
Flydiverny ce9a3b9
fix!: update CRD definition to v1 api - setting preserveUnknownFields…
Flydiverny b43daee
fix: remove invalid key field in CRD spec
Flydiverny 5cbf4e3
fix: add status definition in CRD schema
Flydiverny 01236f0
fix: preserve template
Flydiverny 5743f08
fix: add secretType used by IBM backend to schema
Flydiverny 03eb390
chore: add descriptions in schema
Flydiverny a919ef0
fix: move secretType to item defintion
Flydiverny 1054c82
fix: add projectId used by gcp to validation
Flydiverny 5737a88
fix: add region used by aws BE
Flydiverny 4daecbc
chore: udpate examples
Flydiverny 692b0ac
fix: add more missing fields
Flydiverny fd9fac8
fix: add more missing fields
Flydiverny f7818bb
chore: update jsdoc to match reality
Flydiverny 32b6437
fix: e2e should get crd from v1 api
Flydiverny 79566e5
fix: update CRD validation to allow deprecated type field
Flydiverny 99d9273
fix(docs): update prerequisite kubernetes version
Flydiverny File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: externalsecrets.kubernetes-client.io | ||
|
@@ -8,77 +8,77 @@ metadata: | |
app.kubernetes.io/managed-by: helm | ||
spec: | ||
group: kubernetes-client.io | ||
version: v1 | ||
scope: Namespaced | ||
|
||
names: | ||
shortNames: | ||
- es | ||
kind: ExternalSecret | ||
plural: externalsecrets | ||
singular: externalsecret | ||
|
||
additionalPrinterColumns: | ||
- JSONPath: .status.lastSync | ||
name: Last Sync | ||
type: date | ||
- JSONPath: .status.status | ||
name: status | ||
type: string | ||
- JSONPath: .metadata.creationTimestamp | ||
name: Age | ||
type: date | ||
preserveUnknownFields: false | ||
|
||
validation: | ||
openAPIV3Schema: | ||
required: | ||
- spec | ||
properties: | ||
spec: | ||
versions: | ||
- name: v1 | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} | ||
schema: | ||
openAPIV3Schema: | ||
required: | ||
- spec | ||
type: object | ||
properties: | ||
template: | ||
description: Template which will be deep merged without mutating | ||
any existing fields. into generated secret, can be used to | ||
set for example annotations or type on the generated secret | ||
spec: | ||
type: object | ||
controllerId: | ||
description: The ID of controller instance that manages this ExternalSecret. | ||
This is needed in case there is more than a KES controller instances within the cluster. | ||
type: string | ||
backendType: | ||
type: string | ||
enum: | ||
- secretsManager | ||
- systemManager | ||
- vault | ||
- azureKeyVault | ||
- gcpSecretsManager | ||
- alicloudSecretsManager | ||
- ibmcloudSecretsManager | ||
vaultRole: | ||
type: string | ||
vaultMountPoint: | ||
type: string | ||
kvVersion: | ||
description: Vault K/V version either 1 or 2, default = 2 | ||
type: integer | ||
minimum: 1 | ||
maximum: 2 | ||
keyVaultName: | ||
type: string | ||
key: | ||
type: string | ||
dataFrom: | ||
type: array | ||
items: | ||
type: string | ||
data: | ||
type: array | ||
items: | ||
type: object | ||
anyOf: | ||
- properties: | ||
properties: | ||
controllerId: | ||
description: The ID of controller instance that manages this ExternalSecret. | ||
This is needed in case there is more than a KES controller instances within the cluster. | ||
type: string | ||
type: | ||
type: string | ||
description: >- | ||
DEPRECATED: Use spec.template.type | ||
template: | ||
description: Template which will be deep merged without mutating | ||
any existing fields. into generated secret, can be used to | ||
set for example annotations or type on the generated secret | ||
type: object | ||
x-kubernetes-preserve-unknown-fields: true | ||
backendType: | ||
description: >- | ||
Determines which backend to use for fetching secrets | ||
type: string | ||
enum: | ||
- secretsManager | ||
- systemManager | ||
- vault | ||
- azureKeyVault | ||
- gcpSecretsManager | ||
- alicloudSecretsManager | ||
- ibmcloudSecretsManager | ||
vaultRole: | ||
description: >- | ||
Used by: vault | ||
type: string | ||
vaultMountPoint: | ||
description: >- | ||
Used by: vault | ||
type: string | ||
kvVersion: | ||
description: Vault K/V version either 1 or 2, default = 2 | ||
type: integer | ||
minimum: 1 | ||
maximum: 2 | ||
keyVaultName: | ||
description: >- | ||
Used by: azureKeyVault | ||
type: string | ||
dataFrom: | ||
type: array | ||
items: | ||
type: string | ||
data: | ||
type: array | ||
items: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we could set |
||
type: object | ||
properties: | ||
key: | ||
description: Secret key in backend | ||
type: string | ||
|
@@ -87,60 +87,122 @@ spec: | |
type: string | ||
property: | ||
description: Property to extract if secret in backend is a JSON object | ||
type: string | ||
isBinary: | ||
description: >- | ||
Whether the backend secret shall be treated as binary data | ||
represented by a base64-encoded string. You must set this to true | ||
for any base64-encoded binary data in the backend - to ensure it | ||
is not encoded in base64 again. Default is false. | ||
type: boolean | ||
required: | ||
- key | ||
- name | ||
- properties: | ||
path: | ||
description: >- | ||
Path from SSM to scrape secrets | ||
This will fetch all secrets and use the key from the secret as variable name | ||
type: string | ||
recursive: | ||
description: Allow to recurse thru all child keys on a given path | ||
description: Allow to recurse thru all child keys on a given path, default false | ||
type: boolean | ||
required: | ||
- path | ||
roleArn: | ||
type: string | ||
oneOf: | ||
- properties: | ||
backendType: | ||
enum: | ||
- secretsManager | ||
- systemManager | ||
- properties: | ||
backendType: | ||
enum: | ||
- vault | ||
- properties: | ||
backendType: | ||
enum: | ||
- azureKeyVault | ||
required: | ||
- keyVaultName | ||
- properties: | ||
backendType: | ||
enum: | ||
- gcpSecretsManager | ||
- properties: | ||
backendType: | ||
enum: | ||
- alicloudSecretsManager | ||
- properties: | ||
backendType: | ||
enum: | ||
- ibmcloudSecretsManager | ||
anyOf: | ||
- required: | ||
- data | ||
- required: | ||
- dataFrom | ||
subresources: | ||
status: {} | ||
secretType: | ||
description: >- | ||
Used by: ibmcloudSecretsManager | ||
Type of secret - one of username_password, iam_credentials or arbitrary | ||
type: string | ||
version: | ||
description: >- | ||
Used by: gcpSecretsManager | ||
type: string | ||
x-kubernetes-int-or-string: true | ||
versionStage: | ||
description: >- | ||
Used by: alicloudSecretsManager, secretsManager | ||
type: string | ||
versionId: | ||
description: >- | ||
Used by: secretsManager | ||
type: string | ||
oneOf: | ||
- properties: | ||
key: | ||
name: | ||
property: | ||
isBinary: | ||
secretType: | ||
required: | ||
- key | ||
- name | ||
- properties: | ||
path: | ||
recursive: | ||
required: | ||
- path | ||
roleArn: | ||
type: string | ||
description: >- | ||
Used by: alicloudSecretsManager, secretsManager, systemManager | ||
region: | ||
type: string | ||
description: >- | ||
Used by: secretsManager, systemManager | ||
projectId: | ||
type: string | ||
description: >- | ||
Used by: gcpSecretsManager | ||
oneOf: | ||
- properties: | ||
backendType: | ||
enum: | ||
- secretsManager | ||
- systemManager | ||
- properties: | ||
backendType: | ||
enum: | ||
- vault | ||
- properties: | ||
backendType: | ||
enum: | ||
- azureKeyVault | ||
required: | ||
- keyVaultName | ||
- properties: | ||
backendType: | ||
enum: | ||
- gcpSecretsManager | ||
- properties: | ||
backendType: | ||
enum: | ||
- alicloudSecretsManager | ||
- properties: | ||
backendType: | ||
enum: | ||
- ibmcloudSecretsManager | ||
anyOf: | ||
- required: | ||
- data | ||
- required: | ||
- dataFrom | ||
status: | ||
type: object | ||
properties: | ||
lastSync: | ||
type: string | ||
status: | ||
type: string | ||
additionalPrinterColumns: | ||
- jsonPath: .status.lastSync | ||
name: Last Sync | ||
type: date | ||
- jsonPath: .status.status | ||
name: status | ||
type: string | ||
- jsonPath: .metadata.creationTimestamp | ||
name: Age | ||
type: date | ||
|
||
names: | ||
shortNames: | ||
- es | ||
kind: ExternalSecret | ||
plural: externalsecrets | ||
singular: externalsecret | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: kubernetes-client.io/v1 | ||
kind: ExternalSecret | ||
metadata: | ||
name: alicloud-secretsmanager | ||
spec: | ||
backendType: alicloudSecretsManager | ||
# optional: specify role to assume using provided access key ID and access key secret when retrieving the data | ||
roleArn: acs:ram::{UID}:role/demo | ||
data: | ||
- key: hello-credentials1 | ||
name: password | ||
- key: hello-credentials2 | ||
name: username | ||
# Version Stage in Alibaba Cloud KMS Secrets Manager. Optional, default value is ACSCurrent | ||
versionStage: ACSCurrent |
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
examples/secretsmanager-example.yaml → examples/aws-secretsmanager.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: kubernetes-client.io/v1 | ||
kind: ExternalSecret | ||
metadata: | ||
name: aws-ssm-path | ||
spec: | ||
backendType: systemManager | ||
# optional: specify role to assume when retrieving the data | ||
roleArn: arn:aws:iam::123456789012:role/test-role | ||
# optional: specify region | ||
region: us-east-1 | ||
data: | ||
- key: /foo/name | ||
name: fooName | ||
- path: /extra-people/ | ||
recursive: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could set
x-kubernetes-preserve-unknown-fields: true
to allow extra fields here