-
Notifications
You must be signed in to change notification settings - Fork 122
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
Default certificate does not exist #216
Comments
As written in the referenced haproxy ingress controller issue, Until this issue is identified and resolved I found a WORKAROUND that seems stable enough. Following this link: Haproxy document SSL / TLS
openssl req -x509 -newkey rsa:2048 -keyout example.key -out example.crt -days 365 -nodes -subj "/C=US/ST=Ohio/L=Columbus/O=MyCompany/CN=example.com"
kubectl create secret tls -n {namespace} haproxytempcert --cert="example.crt" --key="example.key"
kubectl edit configmap -n {namespace} {configmap_name} apiVersion: v1 kind: ConfigMap metadata: name: ... namespace: {namespace} data: ... ssl-certificate: "{namespace}/haproxytempcert" <=== (Add) Doing this "sometimes" seems "to wakeup" ingress controller that create default cert using haproxytempcert. If ingress controller DOES NOT wake-up, leave the haproxytempcert secret and ConfigMap annotation (ssl-certificate) to be used by haproxy ingress controller. If Yes now you can delete temporary secrets and ConfigMap annotation:
kubectl edit configmap -n {namespace} {configmap_name} apiVersion: v1 kind: ConfigMap metadata: name: ... namespace: {namespace} data: ...
kubectl delete secret -n {namespace} haproxytempcert Default certificate survive and now contains default haproxy Self-Signed certificate. Better to know why and where this happen. |
@Roxyrob Can you try with the following custom settings, where
|
@dkorunic, was the first try. Indeed deployment manifest has "--default-ssl-certificate" correctly set but no default certificate was created anyway: apiVersion: apps/v1 kind: Deployment metadata: annotations: ... labels: app.kubernetes.io/instance: ingress-haproxy-internal app.kubernetes.io/name: kubernetes-ingress app.kubernetes.io/version: 1.10.10 helm.sh/chart: kubernetes-ingress-1.35.5 name: ingress-haproxy-internal namespace: ingress-haproxy-internal spec: progressDeadlineSeconds: 600 replicas: 2 revisionHistoryLimit: 10 selector: matchLabels: app.kubernetes.io/instance: ingress-haproxy-internal app.kubernetes.io/name: kubernetes-ingress ... template: metadata: creationTimestamp: null labels: app.kubernetes.io/instance: ingress-haproxy-internal app.kubernetes.io/name: kubernetes-ingress spec: containers: - args: - >- --default-ssl-certificate=ingress-haproxy-internal/ingress-haproxy-internal-default-cert - '--configmap=ingress-haproxy-internal/ingress-haproxy-internal' ... When deployment do not create default certificate the only way is the WORKAROUND above. |
I haven't been able to reproduce your issue, it works for me without any issues. Configuration override used:
Helm command to install:
Verify secrets:
Check IC logs:
Everything looks correct. To me it looks like you haven't matched |
In fact, I was wrong in thinking that we need to match As shown below it works as expected, no visible issues whatsoever. Required ingress controller service arguments are enabled, default SSL certificate is being created and it gets exported to the filesystem as needed:
|
Closing the ticket as no-op, nothing to fix here. |
Ok. I'll go deep on this, probably misconfiguration or issue on ArgoCD part creating secret resource .yaml from parameters. |
This issue is related to this ArgoCD behavior/bug interpreting Helm Hooks: Argo hook not running on auto sync only on manual sync #9830 As explained here: "automated sync doesn't trigger synchooks when it's a self-heal action" As soon as ArgoCD will correct to look at "initial deployment" as "self-heal action", Job creating CRDs and Self-Signed certificate (Jobs annotated with helm hooks) will be run correctly in PreSync and GitOps with ArgoCD with syncPolicy.automated will work correctly. This is a common issue for every deployment using Helm Hooks for environment preparation and actually the WORKAROUND is to start a Manual Sync after deplopyment (this can be annoying as haproxy in internal version to reach ArgoCD WebUI will not be immediately ready after deployment - it is needed to temporary use kubectl port-forward or argocd app sync cli). |
Let us keep this issue open for now and I'll keep tracking argoproj/argo-cd#9830. |
ref: Default certificate does not exist #601
On haproxy ingress controller v1.10.10 I get this error in logs:
ERROR global.go:272 default certificate: annotation 'ssl-certificate': secret
'namespace/namespace-default-cert' does not exist
namespace is custom namespace (not default).
I cannot use this ingress controller in https.
If I manually create requested certificate that controller will remove it.
Sometimes ingress controller seems to deploy and auto create default certificates, with the same ingress configuration.
I know I can create custom one, but I need to know how haproxy ingress controller check and choose to create or not its default certificate to support tls without custom one ?
The text was updated successfully, but these errors were encountered: