Skip to content

Conversation

@Miciah
Copy link
Contributor

@Miciah Miciah commented Nov 22, 2018

  • config/v1/types_ingress.go (IngressSpec): Add Domain field.

Related to NE-100.


type IngressSpec struct {
// default suffix. It goes here or it gets removed from server
// Domain specifies the default subdomain for routes.
Copy link
Contributor

Choose a reason for hiding this comment

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

lower "d" in API docs to match the json string.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also is it common knowledge for OpenShift users that domain for ingress means subdomain?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should be. I went with "domain" for consistency with "base domain" (which is as much a subdomain as is the ingress domain). We can explain in documentation how the ingress domain is used to compose the route domain.

@deads2k
Copy link
Contributor

deads2k commented Nov 26, 2018

@ironcladlou confirm that you expect and want the domain to be user changeable. That's a significant change.

@ironcladlou
Copy link
Contributor

@Miciah pretty sure this is immutable, at least for now, agree? If so, @deads2k suggests the field be placed on IngressStatus instead.

@Miciah
Copy link
Contributor Author

Miciah commented Nov 26, 2018

According to #124 (comment)

Controller/Operator maintained information lives in status, cluster-admin maintained information lives in spec.

I didn't see anything about using spec for mutable fields and status for immutable fields. Is that documented?

@deads2k
Copy link
Contributor

deads2k commented Nov 26, 2018

According to #124 (comment)

Controller/Operator maintained information lives in status, cluster-admin maintained information lives in spec.

I didn't see anything about using spec for mutable fields and status for immutable fields. Is that documented?

It's about user specifiable or not. The kube convention is that user specifiable fields are in spec, non-user specifiable ones are in status.

@Miciah
Copy link
Contributor Author

Miciah commented Nov 26, 2018

It's user-specifiable, but only once (during installation), and it's not anyone-changeable (neither users nor operators should be changing it). Documentation could be clearer. I see your point though and will update the PR shortly.

@Miciah Miciah force-pushed the add-ingress-domain branch from f30cb17 to a8311e2 Compare November 26, 2018 16:26
@Miciah
Copy link
Contributor Author

Miciah commented Nov 26, 2018

Updated to move the new field from spec to status.

@deads2k
Copy link
Contributor

deads2k commented Nov 26, 2018

/approve

@ironcladlou your API. If you're happy with the field name and doc, you can lgtm. Think of this as your doc that will explain to an admin what it does and to developers how to use it.

/assign @ironcladlou

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 26, 2018
}

type IngressStatus struct {
// domain specifies the default subdomain that will be used to compose
Copy link
Contributor

Choose a reason for hiding this comment

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

How about:

domain is used to generate the hostname for a route when none is specified. The pattern that is used is: routename-projectname.domain.

@knobunc
Copy link
Contributor

knobunc commented Nov 26, 2018

@deads2k it feels really weird for something to read its state from status not spec. I would argue that it is mutable, but doing so ought to be a rare event. So I'd lean for spec. Thoughts?

@ironcladlou
Copy link
Contributor

I was wrong, it's mutable after all. Back to spec it goes!

* config/v1/types_ingress.go (IngressSpec): Add Domain field.

Related to NE-100.

https://jira.coreos.com/browse/NE-100
@Miciah Miciah force-pushed the add-ingress-domain branch from a8311e2 to 2ba7723 Compare November 26, 2018 20:12
@Miciah
Copy link
Contributor Author

Miciah commented Nov 26, 2018

And with the latest push, Domain has gone back to IngressSpec. Now with more docstring!

@ironcladlou
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 26, 2018
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, ironcladlou, Miciah

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

The pull request process is described here

Details 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

@ironcladlou
Copy link
Contributor

/retest

@openshift-merge-robot openshift-merge-robot merged commit 6a375c5 into openshift:master Nov 26, 2018
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. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants