cyberark / secretless-broker

Secure your apps by making them Secretless
Apache License 2.0
234 stars 42 forks source link

Add schema for CRD #1442

Closed szh closed 2 years ago

szh commented 2 years ago

Desired Outcome

One of the ways that the CyberArk Secretless Broker (SB) can be configured is by using a Kubernetes Custom Resource Definition (CRD) that is specifically created for SB Configuration. This method of configuration is documented here.

Currently, our documentation suggests that users should deploy these CRDs using the {{apiextensions.k8s.io/v1beta1}} Kubernetes API version. However, support for this API version has been fully removed in Kubernetes API controllers as of Kubernetes v1.22.

This means that any customers who want to use the Secretless Broker in Kubernetes clusters that are v1.22 or newer (or, correspondingly OpenShift v4.9 or newer) must create CRDs using the v1 API version, that is, apiextensions.k8s.io/v1.

However, for this v1 API version, the CRD specifications must include a structural schema as described here: https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#specifying-a-structural-schema

An example of a CRD manifest that contains a structural schema is here: https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#create-a-customresourcedefinition

More details at https://github.com/cyberark/sidecar-injector/pull/64

Implemented Changes

Connected Issue/Story

CyberArk internal issue link: ONYX-14759

Definition of Done

Changelog

Test coverage

Documentation

Behavior

Security

codeclimate[bot] commented 2 years ago

Code Climate has analyzed commit b2211be3 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 54.8% (0.0% change).

View more on Code Climate.