-
Notifications
You must be signed in to change notification settings - Fork 191
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
Introduce ingress controller #552
Conversation
7756885
to
acf220c
Compare
// 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 { |
There was a problem hiding this comment.
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{} |
There was a problem hiding this comment.
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{} |
There was a problem hiding this comment.
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{ |
There was a problem hiding this comment.
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"}, |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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.
f884af7
to
5a93539
Compare
1963903
to
27d8a88
Compare
/hold |
27d8a88
to
d892dfd
Compare
Lovely jubbly! |
/test e2e-aws-operator |
/retest |
2 similar comments
/retest |
/retest |
/unhold |
/retest Please review the full test history for this PR and help us cut down flakes. |
2 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
4b8fa0d
to
baf2d3e
Compare
/lgtm |
[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 |
/retest Please review the full test history for this PR and help us cut down flakes. |
6 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
No description provided.