serving icon indicating copy to clipboard operation
serving copied to clipboard

custom port of service url

Open vangie opened this issue 3 years ago • 1 comments

Describe the feature

I want add a port to knative service url in my dev environment. I add port to domain-template of config-network

kubectl patch configmap -n knative-serving config-network -p "{\"data\": {\"domain-template\": \"{{.Name}}-{{.Namespace}}.{{.Domain}}:2080\"}}"

the I get the following error

babel-0900640b-7441-4b22-b7c9-a333f0491a0c   http://babel-0900640b-7441-4b22-b7c9-a333f0491a0c-babel-tenant.127-0-0-1.sslip.io   babel-0900640b-7441-4b22-b7c9-a333f0491a0c-00001   18m   1 OK / 3     Unknown   Unknown : invalid domain name "babel-0900640b-7441-4b22-b7c9-a333f0491a0c-babel-tenant.127-0-0-1.sslip.io:2080": url: Invalid value: "babel-0900640b-7441-4b22-b7c9-a333f0491a0c-babel-tenant.127-0-0-1.sslip.io:2080": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')

vangie avatar Aug 02 '22 09:08 vangie

Kubernetes doesn't allow a : in the domain. To add a port, use a containerPort in .spec.template.spec.containers (example

psschwei avatar Aug 02 '22 12:08 psschwei

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Nov 01 '22 01:11 github-actions[bot]

This issue or pull request is stale because it has been open for 90 days with no activity.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close

/lifecycle stale

knative-prow-robot avatar Dec 01 '22 02:12 knative-prow-robot

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Mar 02 '23 01:03 github-actions[bot]

Seems answered by Pauls comment. Otherwise please reopen.

/close

ReToCode avatar Mar 08 '23 12:03 ReToCode

@ReToCode: Closing this issue.

In response to this:

Seems answered by Pauls comment. Otherwise please reopen.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

knative-prow[bot] avatar Mar 08 '23 12:03 knative-prow[bot]