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

Add Namespace field to ClusterDomainClaim #326

Merged
merged 1 commit into from
Jan 6, 2021

Conversation

julz
Copy link
Member

@julz julz commented Jan 6, 2021

Changes

  • 🎁 Adds Spec.Namespace to ClusterDomainClaim.

This field has two purposes:

  • It replaces the use of ownerReferences for ensuring that only one
    DomainMapping can use a ClusterDomainClaim at a time. This avoids
    using cross-namespace ownerReferences, which aren't supported.
  • It allows Cluster Operators to delegate a particular domain name to a
    namespace, allowing that namespace (and no other) to create DomainMappings
    with a particular name (thereby preventing other namespaces squatting on or
    intercepting the name).

/kind enhancement

First part of knative/serving#10477 (and also to enable multi-tenant use of DomainMapping, see knative/serving#9713).

Release Note

Adds `spec.Namespace` to `ClusterDomainClaim` to control which namespace owns the ability to create a `DomainMapping` with the same name as the claim.

/assign @mattmoor @tcnghia

This field has two purposes:

- It replaces the ownerReference for ensuring that only one
DomainMapping can use a ClusterDomainClaim at a time. This avoids a
cross-namespace ownerReference, which isn't supported.
- It allows Cluster Operators to delegate a particular domain name to a
namespace, allowing that namespace to create DomainMappings with a
particular name (and preventing other namespaces squatting or
intercepting the name).
@knative-prow-robot knative-prow-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 6, 2021
@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label Jan 6, 2021
@codecov
Copy link

codecov bot commented Jan 6, 2021

Codecov Report

Merging #326 (3d2b26f) into master (99ffcf0) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #326   +/-   ##
=======================================
  Coverage   95.09%   95.09%           
=======================================
  Files          38       38           
  Lines         815      815           
=======================================
  Hits          775      775           
  Misses         29       29           
  Partials       11       11           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 99ffcf0...3d2b26f. Read the comment docs.

Comment on lines +65 to +67
// Namespace is the namespace which is allowed to create a DomainMapping
// using this ClusterDomainClaim's name.
Namespace string `json:"namespace"`
Copy link
Member

Choose a reason for hiding this comment

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

We should think about requiring this next release.

Copy link
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 6, 2021
@knative-prow-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: julz, mattmoor

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 6, 2021
@knative-prow-robot knative-prow-robot merged commit 6ccde5f into knative:master Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the CLA. kind/enhancement lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants