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

Make the hostname assigned to tags configurable by Operators. #4292

Merged

Conversation

mattmoor
Copy link
Member

@mattmoor mattmoor commented Jun 7, 2019

This adds a tagTemplate to the config-network ConfigMap so that (similar to
domainTemplate) Operators may configure how hostnames are assigned to tags.

This change just makes it configurable, a subsequent change will change the default
value to {{.Tag}}-{{.Name}} to reduce the likelihood of naming collisions with
BYO-revision-names

Progress towards: #4206

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Jun 7, 2019
@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. area/API API objects and controllers area/networking labels Jun 7, 2019
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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 Jun 7, 2019
This adds a `tagTemplate` to the `config-network` ConfigMap so that (similar to
`domainTemplate`) Operators may configure how hostnames are assigned to tags.

This change just makes it configurable, a subsequent change will change the default
value to `{{.Tag}}-{{.Name}}` to reduce the likelihood of naming collisions with
BYO-revision-names

Progress towards: knative#4206
@mattmoor mattmoor force-pushed the configurable-tag-hostnames branch from 04ad2d8 to 592e69f Compare June 7, 2019 20:12
@knative-metrics-robot
Copy link

The following is the coverage report on pkg/.
Say /test pull-knative-serving-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/network/network.go 96.7% 93.1% -3.7
pkg/reconciler/route/reconcile_resources.go 85.0% 84.9% -0.1
pkg/reconciler/route/resources/cluster_ingress.go 94.6% 93.2% -1.4
pkg/reconciler/route/resources/service.go 96.2% 85.7% -10.4
pkg/reconciler/route/traffic/traffic.go 94.2% 93.4% -0.8

@andrew-su
Copy link
Member

/lgtm

Looks good! Thanks for doing some tidy-ing up as well in the tests.
The integration tests are complaining about codegen 🤔 I come back and I see you've already fixed that :)

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 7, 2019
func checkTagTemplate(t *template.Template) error {
// To a test run of applying the template, and see if we
// produce a result without error.
data := TagTemplateValues{
Copy link
Contributor

Choose a reason for hiding this comment

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

this can probably live outside the function not to construct it each time.

@knative-prow-robot knative-prow-robot merged commit 20a0764 into knative:master Jun 7, 2019
@mattmoor mattmoor deleted the configurable-tag-hostnames branch June 7, 2019 21:57
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. area/API API objects and controllers area/networking cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants