Skip to content

Commit

Permalink
Merge pull request #531 from Danil-Grigorev/ha-proxy-healthcheck-200
Browse files Browse the repository at this point in the history
🐛 Use 200 as an expected response from kube-api in haproxy
  • Loading branch information
Danil-Grigorev authored Dec 20, 2024
2 parents 69e01b5 + bb2410b commit 8d27813
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 20 deletions.
6 changes: 4 additions & 2 deletions examples/docker/air-gapped/rke2-sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ spec:
airGapped: true
serverConfig:
cni: calico
kubeAPIServer:
extraArgs:
- --anonymous-auth=true
kubeProxy:
extraEnv:
hello: world
Expand Down Expand Up @@ -163,8 +166,7 @@ data:
backend kube-apiservers
option httpchk GET /healthz
http-check expect status 401
# TODO: we should be verifying (!)
{{range $server, $address := .BackendServers}}
server {{ $server }} {{ JoinHostPort $address $.BackendControlPlanePort }} check check-ssl verify none resolvers docker resolve-prefer {{ if $.IPv6 -}} ipv6 {{- else -}} ipv4 {{- end }}
{{- end}}
Expand Down
7 changes: 5 additions & 2 deletions examples/docker/cis-profile/rke2-sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ metadata:
spec:
replicas: ${CABPR_CP_REPLICAS}
version: ${KUBERNETES_VERSION}+rke2r1
serverConfig:
kubeAPIServer:
extraArgs:
- --anonymous-auth=true
agentConfig:
cisProfile: ${CIS_PROFILE}
infrastructureRef:
Expand Down Expand Up @@ -153,8 +157,7 @@ data:
backend kube-apiservers
option httpchk GET /healthz
http-check expect status 401
# TODO: we should be verifying (!)
{{range $server, $address := .BackendServers}}
server {{ $server }} {{ JoinHostPort $address $.BackendControlPlanePort }} check check-ssl verify none resolvers docker resolve-prefer {{ if $.IPv6 -}} ipv6 {{- else -}} ipv4 {{- end }}
{{- end}}
Expand Down
6 changes: 4 additions & 2 deletions examples/docker/clusterclass/clusterclass-quick-start.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ data:
backend kube-apiservers
option httpchk GET /healthz
http-check expect status 401
# TODO: we should be verifying (!)
{{range $server, $address := .BackendServers}}
server {{ $server }} {{ JoinHostPort $address $.BackendControlPlanePort }} check check-ssl verify none resolvers docker resolve-prefer {{ if $.IPv6 -}} ipv6 {{- else -}} ipv4 {{- end }}
{{- end}}
Expand Down Expand Up @@ -156,6 +155,9 @@ spec:
name: rke2-class-control-plane
serverConfig:
cni: calico
kubeAPIServer:
extraArgs:
- --anonymous-auth=true
disableComponents:
kubernetesComponents: [ "cloudController"]
nodeDrainTimeout: 2m
Expand Down
6 changes: 4 additions & 2 deletions examples/docker/disable-components/rke2-sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ spec:
kind: DockerMachineTemplate
name: controlplane
serverConfig:
kubeAPIServer:
extraArgs:
- --anonymous-auth=true
disableComponents:
pluginComponents:
- "rke2-ingress-nginx"
Expand Down Expand Up @@ -155,8 +158,7 @@ data:
backend kube-apiservers
option httpchk GET /healthz
http-check expect status 401
# TODO: we should be verifying (!)
{{range $server, $address := .BackendServers}}
server {{ $server }} {{ JoinHostPort $address $.BackendControlPlanePort }} check check-ssl verify none resolvers docker resolve-prefer {{ if $.IPv6 -}} ipv6 {{- else -}} ipv4 {{- end }}
{{- end}}
Expand Down
6 changes: 4 additions & 2 deletions examples/docker/enable-multus/rke2-sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ spec:
serverConfig:
cniMultusEnable: true
cni: calico
kubeAPIServer:
extraArgs:
- --anonymous-auth=true
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: DockerMachineTemplate
Expand Down Expand Up @@ -154,8 +157,7 @@ data:
backend kube-apiservers
option httpchk GET /healthz
http-check expect status 401
# TODO: we should be verifying (!)
{{range $server, $address := .BackendServers}}
server {{ $server }} {{ JoinHostPort $address $.BackendControlPlanePort }} check check-ssl verify none resolvers docker resolve-prefer {{ if $.IPv6 -}} ipv6 {{- else -}} ipv4 {{- end }}
{{- end}}
Expand Down
7 changes: 5 additions & 2 deletions examples/docker/kube-vip/rke2-sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ spec:
template:
spec:
agentConfig: {}
serverConfig:
kubeAPIServer:
extraArgs:
- --anonymous-auth=true
---
apiVersion: v1
kind: ConfigMap
Expand Down Expand Up @@ -195,8 +199,7 @@ data:
backend kube-apiservers
option httpchk GET /healthz
http-check expect status 401
# TODO: we should be verifying (!)
{{range $server, $address := .BackendServers}}
server {{ $server }} {{ JoinHostPort $address $.BackendControlPlanePort }} check check-ssl verify none resolvers docker resolve-prefer {{ if $.IPv6 -}} ipv6 {{- else -}} ipv4 {{- end }}
{{- end}}
Expand Down
6 changes: 4 additions & 2 deletions examples/docker/online-default/cluster-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ spec:
disableComponents:
kubernetesComponents:
- cloudController
kubeAPIServer:
extraArgs:
- --anonymous-auth=true
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: DockerMachineTemplate
Expand Down Expand Up @@ -164,8 +167,7 @@ data:
backend kube-apiservers
option httpchk GET /healthz
http-check expect status 401
# TODO: we should be verifying (!)
{{range $server, $address := .BackendServers}}
server {{ $server }} {{ JoinHostPort $address $.BackendControlPlanePort }} check check-ssl verify none resolvers docker resolve-prefer {{ if $.IPv6 -}} ipv6 {{- else -}} ipv4 {{- end }}
{{- end}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ data:
backend kube-apiservers
option httpchk GET /healthz
http-check expect status 401
# TODO: we should be verifying (!)
{{range $server, $address := .BackendServers}}
server {{ $server }} {{ JoinHostPort $address $.BackendControlPlanePort }} check check-ssl verify none resolvers docker resolve-prefer {{ if $.IPv6 -}} ipv6 {{- else -}} ipv4 {{- end }}
{{- end}}
Expand Down Expand Up @@ -111,6 +110,9 @@ spec:
disableComponents:
kubernetesComponents:
- cloudController
kubeAPIServer:
extraArgs:
- --anonymous-auth=true
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: DockerMachineTemplate
Expand Down
6 changes: 4 additions & 2 deletions test/e2e/data/infrastructure/cluster-template-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ data:
backend kube-apiservers
option httpchk GET /healthz
http-check expect status 401
# TODO: we should be verifying (!)
{{range $server, $address := .BackendServers}}
server {{ $server }} {{ JoinHostPort $address $.BackendControlPlanePort }} check check-ssl verify none resolvers docker resolve-prefer {{ if $.IPv6 -}} ipv6 {{- else -}} ipv4 {{- end }}
{{- end}}
Expand Down Expand Up @@ -112,6 +111,9 @@ spec:
disableComponents:
kubernetesComponents:
- cloudController
kubeAPIServer:
extraArgs:
- --anonymous-auth=true
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: DockerMachineTemplate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ data:
backend kube-apiservers
option httpchk GET /healthz
http-check expect status 401
# TODO: we should be verifying (!)
{{range $server, $address := .BackendServers}}
server {{ $server }} {{ JoinHostPort $address $.BackendControlPlanePort }} check check-ssl verify none resolvers docker resolve-prefer {{ if $.IPv6 -}} ipv6 {{- else -}} ipv4 {{- end }}
{{- end}}
Expand Down Expand Up @@ -161,6 +160,9 @@ spec:
cni: calico
disableComponents:
kubernetesComponents: [ "cloudController"]
kubeAPIServer:
extraArgs:
- --anonymous-auth=true
rolloutStrategy:
type: "RollingUpdate"
rollingUpdate:
Expand Down

0 comments on commit 8d27813

Please sign in to comment.