Skip to content

[v12] Add support for Protobuf Enums into Operator CRDs#32559

Merged
tigrato merged 2 commits intobranch/v12from
tigrato/crds-emnums-v12
Sep 26, 2023
Merged

[v12] Add support for Protobuf Enums into Operator CRDs#32559
tigrato merged 2 commits intobranch/v12from
tigrato/crds-emnums-v12

Conversation

@tigrato
Copy link
Copy Markdown
Contributor

@tigrato tigrato commented Sep 26, 2023

Backport of #32469 to branch/v12

* Add support for Protobuf Enums into Operator CRDs

This PR marks the Teleport enum fields as integer or string values. The
integer option is to ensure we are backwards compatibile with
previously installed CRDs.

Users can now represent their roles in Kubernetes custom resources and
refer enum fields as strings while their protobuf wire type is int32.

Fixes #29686

* add tests

* fix unit test
Comment on lines +1924 to +1930
<<<<<<< HEAD:operator/crdgen/testdata/golden/resources.teleport.dev_roles.yaml
=======
create_host_user_mode:
description: CreateHostUserMode allows users to be automatically
created on a host when not set to off
x-kubernetes-int-or-string: true
>>>>>>> 9a556d8ab1 (Add support for Protobuf Enums into Operator CRDs (#32469)):integrations/operator/crdgen/testdata/golden/resources.teleport.dev_roles.yaml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

😱

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Forgot to update the snapshots 🦥

@tigrato tigrato enabled auto-merge September 26, 2023 15:20
@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from hugoShaka September 26, 2023 15:36
@tigrato tigrato added this pull request to the merge queue Sep 26, 2023
Merged via the queue into branch/v12 with commit 789cd2e Sep 26, 2023
@tigrato tigrato deleted the tigrato/crds-emnums-v12 branch September 26, 2023 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants