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

Set ingress class default to false #109

Merged
merged 3 commits into from
Jan 18, 2023
Merged

Conversation

alex-bezek
Copy link
Collaborator

What

Changes the default helm values for whether the ngrok ingress class should be the default from true to false. We should not assume we would be the default as it could cause problems if someone installs it in a cluster with another ingress controller.

How

Change the value in the values.yaml file

Breaking Changes

Technically yes, this is non-passive and reverses the behavior. If its installed in a cluster and its the only ingress class though, it will not pickup things by default anymore.

Our logic for how ingress classes are handled is here https://github.com/ngrok/kubernetes-ingress-controller/blob/main/internal/controllers/main.go#L29-L37 . With these helm defaults, you would install it in the cluster and would need to specify the ingress class on their ingress objects. Alternatively, if we set the default value for ingressClass.create to false, then if this is the only controller installed https://github.com/ngrok/kubernetes-ingress-controller/blob/main/internal/controllers/main.go#L30 would make it handle ingress objects by default.

Our logic for ingress classes may need to change up a bit at some point, but I haven't found any specifications on how it behaves in each scenario.

@alex-bezek alex-bezek requested a review from a team as a code owner January 18, 2023 19:21
@alex-bezek alex-bezek marked this pull request as draft January 18, 2023 20:35
@alex-bezek alex-bezek force-pushed the alex/ingress-class-default-false branch from 02aad15 to ea85054 Compare January 18, 2023 22:30
@alex-bezek alex-bezek marked this pull request as ready for review January 18, 2023 22:30
@alex-bezek
Copy link
Collaborator Author

We discussed the logic around the ingress controller. We agreed that we should prioritize these usecases:

  • a user can add the ngrok ingress class to their ingress objects to have the controller pick them up
  • a user can set default to true to make non-marked classes get picked up.

But we should not try to support a special case where if you install it and its the only one, then it should try to act like a default since that is error prone and somewhat surprising. @jonstacks let me know if that summarizes our conversation

Comment on lines +27 to +33
# Remove finalizers from domains in namespace
kubectl get domains -A -o custom-columns=NAMESPACE:metadata.namespace,NAME:metadata.name --no-headers | \
while read -r i
do
echo "kubectl get domains -n $i -o=json | jq '.metadata.finalizers = null' | kubectl apply -f -"
kubectl get domains -n $i -o=json | jq '.metadata.finalizers = null' | kubectl apply -f -
done
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the domains hang the namespace deletion since they have finalizers

@alex-bezek alex-bezek enabled auto-merge (squash) January 18, 2023 22:34
@alex-bezek alex-bezek merged commit ebc6951 into main Jan 18, 2023
@jonstacks jonstacks added the area/helm-chart Issues dealing with the helm chart label Jan 20, 2023
@alex-bezek alex-bezek deleted the alex/ingress-class-default-false branch February 23, 2023 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/helm-chart Issues dealing with the helm chart
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants