-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Implement Cilium Ingress #15795
Implement Cilium Ingress #15795
Conversation
Hi @zadjadr. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
14408d0
to
f4d5a8d
Compare
/ok-to-test |
/cc @johngmyers |
f4d5a8d
to
16a7b9b
Compare
@olemarkus I have added all your suggestions here (except for the possible check on shared lb name): 16a7b9b I'll squash the commits if you're happy with the changes. |
2f9d81f
to
d6be292
Compare
d6be292
to
a7fe495
Compare
/retest |
pkg/model/components/cilium.go
Outdated
c.Ingress.EnableSecretsSync = fi.PtrTo(true) | ||
} | ||
if c.Ingress.LoadBalancerAnnotationPrefixes == "" { | ||
c.Ingress.LoadBalancerAnnotationPrefixes = "service.beta.kubernetes.io service.kubernetes.io cloud.google.com" |
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.
Doesn't cilium have a default here if we leave it blank?
I think it would be good to just leave this one unset unless configured. That way we don't have to e.g remove the beta annotation if cilium changes default.
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.
Where can I read up on that? I know the helm chart sets a default value in the configmap, but no idea if cilium will set it if not set in the configmap
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.
Okay found the default options here: https://pkg.go.dev/github.com/cilium/cilium/operator/option
I'll remove the stuff that can be left blank.
pkg/model/components/cilium.go
Outdated
c.Ingress.DefaultLoadBalancerMode = "dedicated" | ||
} | ||
if c.Ingress.SharedLoadBalancerServiceName == "" { | ||
c.Ingress.SharedLoadBalancerServiceName = "cilium-ingress" |
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.
Same as above, if cilium provides a default value, we don't have to explicitly set a value.
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.
Where did you find the default value set by cilium? I can't find it anywhere in https://pkg.go.dev/github.com/cilium/cilium/operator/option or in https://github.com/cilium/cilium/tree/main/pkg/defaults
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 think these are the ones: https://github.com/cilium/cilium/blob/main/operator/pkg/ingress/ingress_options.go#L21-L31.
name: "cilium-operator" | ||
namespace: kube-system | ||
--- | ||
# Source: cilium/templates/cilium-ingress-service.yaml |
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.
Shouldn't this one only be created if one is using the shared loadbalancer?
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.
Atleast the helm chart always creates these if ingress is enabled: https://github.com/cilium/cilium/blob/v1.14.1/install/kubernetes/cilium/templates/cilium-ingress-service.yaml
But it makes sense to disable this behavior in kops. Should we go against the helm chart here?
By the way, just curious about this: why do we not create a "values.yaml" and generate the entire cilium k8s-1.16-v1.13.yaml.template
via helms go library?
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.
That may be an interesting approach for the future.
nodePort: | ||
type: LoadBalancer | ||
--- | ||
# Source: cilium/templates/cilium-ingress-service.yaml |
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.
Same as above.
a7fe495
to
18bf35f
Compare
18bf35f
to
232484c
Compare
Co-authored-by: Ciprian Hacman <ciprian@hakman.dev> fmt
232484c
to
47919e5
Compare
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.
Thanks @zadjadr, LGTM!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hakman 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 |
Fixes #15784