Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(kubernetes): Update API group of NetworkPolicy and PodSecurityPolicy #4058

Merged
merged 3 commits into from
Sep 26, 2019
Merged

chore(kubernetes): Update API group of NetworkPolicy and PodSecurityPolicy #4058

merged 3 commits into from
Sep 26, 2019

Conversation

ezimanyi
Copy link
Contributor

  • refactor(kubernetes): Remove getters from KubernetesKind

    Once a KubernetesKind has been created, external classes should
    (and do) only care about its string representation, not the individual fields. Remove the unused getters from the name and apiGroup fields (and update one test that was relying on them).

  • chore(kubernetes): Update API group of NetworkPolicy and PodSecurityPolicy

    The NetworkPolicy and PodSecurityPolicy kinds have been moved from extensions/v1beta1 to networking.k8s.io/v1 and policy/v1beta1 respectively. Update the API group for these kinds in KubernetesKind.

    Given how the V2 provider queries kinds, this change actually has no functional effect as kinds from built-in API groups are serialized as the kind name alone (wihtout api group) leaving kubectl to resolve the API group. As a result this will neither break users on old versions of Kubernetes nor would failing to make this change have broken users of 1.16 when API stops serving from the old endpoints. That being said, it makes sense to keep these API groups up to date, both for documentation reasons and in the event that in the future we begin using them.

Once a KubernetesKind has been created, external classes should
(and do) only care about its string representation, not the
individual fields. Remove the unused getters from the name and
apiGroup fields (and update one test that was relying on them).
…olicy

The NetworkPolicy and PodSecurityPolicy kinds have been moved from
extensions/v1beta1 to networking.k8s.io/v1 and policy/v1beta1
respectively. Update the API group for these kinds in KubernetesKind.

Given how the V2 provider queries kinds, this change actually has no
functional effect as kinds from built-in API groups are serialized
as the kind name alone (wihtout api group) leaving kubectl to resolve
the API group. As a result this will neither break users on old
versions of Kubernetes nor would failing to make this change have
broken users of 1.16 when API stops serving from the old endpoints.
That being said, it makes sense to keep these API groups up to date,
both for documentation reasons and in the event that in the future we
begin using them.
Ingress has moved to networking.k8s.io
Copy link
Contributor

@maggieneterval maggieneterval left a comment

Choose a reason for hiding this comment

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

⬆️ 📆 👥 📜

@ezimanyi ezimanyi merged commit d631f2c into spinnaker:master Sep 26, 2019
@ezimanyi ezimanyi deleted the update-kinds branch September 26, 2019 19:08
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