Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

feat: add validation to CRD #208

Merged
merged 4 commits into from
Nov 8, 2019

Conversation

Flydiverny
Copy link
Member

No description provided.

@Flydiverny Flydiverny mentioned this pull request Nov 8, 2019
@Flydiverny Flydiverny requested a review from silasbw November 8, 2019 19:43
Copy link
Contributor

@silasbw silasbw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great hygiene PR 🥇 one question

@@ -215,6 +215,17 @@ data:
password: MTIzNA==
```

## Deprecations
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, nice.

template:
metadata:
annotations:
external-secret: 'Yes please!'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😄

name: Age
type: date

validation:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you know which version of Kubernetes introduced validation for CRDs? I think we should use validation, but we might need to explicitly call out the minimum version required.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be available in 1.12 which is as far back as the official hosted kubernetes docs go now
https://v1-12.docs.kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#validation
think its a fair requirement :)

Copy link
Member Author

@Flydiverny Flydiverny Nov 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heres the list I was looking for https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/
Seems to have been enabled by default as beta in 1.9+ ( CustomResourceValidation )

CustomResourceSubresources requires 1.11+

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants