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

Introduce ingress controller #552

Merged

Conversation

awgreene
Copy link
Contributor

No description provided.

@awgreene awgreene changed the title Introduce ingress controller WIP: Introduce ingress controller Feb 16, 2021
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 16, 2021
@awgreene awgreene force-pushed the introduce-ingress-controller branch 2 times, most recently from 7756885 to acf220c Compare February 16, 2021 19:33
// For each Status.ComponentRoute resource, if a Spec.ComponentRoute with a matching
// namespace.name touple exists create the role and roleBinding for each consumer users.
// If no matching Spec.ComponentRoute exists, make sure any RBAC that was generated is removed.
for _, componentRoute := range ingress.Status.ComponentRoutes {
Copy link
Contributor

Choose a reason for hiding this comment

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

you need to go in the other direction. In order to be able to observe a status and know a thing needs to be removed, you need to find all the roles and rolebindings you've created and see which ones don't belong. A label seesm appropriate.

}

// Generate namespaceName mapping
mapToSecretName := map[types.NamespacedName]string{}
Copy link
Contributor

Choose a reason for hiding this comment

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

I know it's a map. Tell me what the key is: keyToValue

}

// Generate namespaceName mapping
mapToSecretName := map[types.NamespacedName]string{}
Copy link
Contributor

Choose a reason for hiding this comment

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

don't reuse types.NamespacedName. Create a local struct type for this key.

// TODO: Generate Name and add labels to avoid componentRoute.Name collisions.
Name: crName,
Namespace: r.config.SecretNamespace,
OwnerReferences: []metav1.OwnerReference{
Copy link
Contributor

Choose a reason for hiding this comment

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

No. I don't see a need or desire to tie this to a cluster resource that can never be deleted.

},
Rules: []rbacv1.PolicyRule{
{
Verbs: []string{"get", "list"},
Copy link
Contributor

Choose a reason for hiding this comment

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

add watch


// Reconcile expects request to refer to a ingress in the operator namespace,
// and will do all the work to ensure the ingress is in the desired state.
func (r *reconciler) Reconcile(request reconcile.Request) (reconcile.Result, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

how do errors here show up as degraded in the operator. I think this and the lbirary-go apply are the most critical to work out ot decide if it can go here or needs to go elsewhere.

pkg/operator/controller/ingress-routes/controller.go Outdated Show resolved Hide resolved
pkg/operator/operator.go Outdated Show resolved Hide resolved
@awgreene awgreene force-pushed the introduce-ingress-controller branch 2 times, most recently from f884af7 to 5a93539 Compare February 24, 2021 03:29
@awgreene awgreene force-pushed the introduce-ingress-controller branch 3 times, most recently from 1963903 to 27d8a88 Compare March 1, 2021 18:52
@awgreene awgreene changed the title WIP: Introduce ingress controller Introduce ingress controller Mar 3, 2021
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 3, 2021
pkg/util/hash.go Show resolved Hide resolved
test/e2e/ingress_test.go Outdated Show resolved Hide resolved
@awgreene
Copy link
Contributor Author

awgreene commented Mar 4, 2021

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 4, 2021
@awgreene awgreene force-pushed the introduce-ingress-controller branch from 27d8a88 to d892dfd Compare March 17, 2021 14:14
@Miciah
Copy link
Contributor

Miciah commented Mar 25, 2021

Lovely jubbly!
/lgtm

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Mar 25, 2021
@Miciah
Copy link
Contributor

Miciah commented Mar 27, 2021

/test e2e-aws-operator

@awgreene
Copy link
Contributor Author

/retest

2 similar comments
@awgreene
Copy link
Contributor Author

/retest

@awgreene
Copy link
Contributor Author

/retest

@awgreene
Copy link
Contributor Author

/unhold

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 29, 2021
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@awgreene awgreene force-pushed the introduce-ingress-controller branch from 4b8fa0d to baf2d3e Compare March 30, 2021 02:36
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Mar 30, 2021
@Miciah
Copy link
Contributor

Miciah commented Mar 30, 2021

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 30, 2021
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: awgreene, Miciah

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

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

6 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants