Remove the affinity for deployment.
This commit is contained in:
parent
64bc49b0be
commit
54b04ba3a5
3 changed files with 18 additions and 2 deletions
|
|
@ -14,9 +14,18 @@ helm repo update byjg
|
||||||
helm upgrade --install --create-namespace -n easyhaproxy easyhaproxy byjg/easyhaproxy
|
helm upgrade --install --create-namespace -n easyhaproxy easyhaproxy byjg/easyhaproxy
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Deployment Types
|
||||||
|
|
||||||
|
EasyHAProxy can be deployed in two ways:
|
||||||
|
|
||||||
|
1. **DaemonSet (default)**: When `service.create: false`, EasyHAProxy is deployed as a DaemonSet with hostPort, and will only be scheduled on nodes with the masterNode label.
|
||||||
|
2. **Deployment**: When `service.create: true`, EasyHAProxy is deployed as a Deployment with a Service (ClusterIP or NodePort), and the `replicaCount` value determines the number of replicas (defaults to 1 if not specified).
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
replicaCount: 1 # Only applies when service.create is true (defaults to 1 if not specified)
|
||||||
|
|
||||||
image:
|
image:
|
||||||
repository: byjg/easy-haproxy
|
repository: byjg/easy-haproxy
|
||||||
pullPolicy: Always # IfNotPresent
|
pullPolicy: Always # IfNotPresent
|
||||||
|
|
@ -53,7 +62,8 @@ easyhaproxy:
|
||||||
certbot:
|
certbot:
|
||||||
email: ""
|
email: ""
|
||||||
|
|
||||||
# Make sure to create this
|
# Master node configuration - only used when service.create is false (DaemonSet mode)
|
||||||
|
# When service.create is true (Deployment with ClusterIP/NodePort), this is ignored
|
||||||
masterNode:
|
masterNode:
|
||||||
label: easyhaproxy/node
|
label: easyhaproxy/node
|
||||||
values:
|
values:
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,9 @@ metadata:
|
||||||
labels:
|
labels:
|
||||||
{{- include "easyhaproxy.labels" . | nindent 4 }}
|
{{- include "easyhaproxy.labels" . | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
|
{{- if .Values.service.create }}
|
||||||
|
replicas: {{ .Values.replicaCount | default 1 }}
|
||||||
|
{{- end }}
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
{{- include "easyhaproxy.selectorLabels" . | nindent 6 }}
|
{{- include "easyhaproxy.selectorLabels" . | nindent 6 }}
|
||||||
|
|
@ -15,6 +18,7 @@ spec:
|
||||||
labels:
|
labels:
|
||||||
{{- include "easyhaproxy.selectorLabels" . | nindent 8 }}
|
{{- include "easyhaproxy.selectorLabels" . | nindent 8 }}
|
||||||
spec:
|
spec:
|
||||||
|
{{- if not .Values.service.create }}
|
||||||
affinity:
|
affinity:
|
||||||
nodeAffinity:
|
nodeAffinity:
|
||||||
requiredDuringSchedulingIgnoredDuringExecution:
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
|
@ -24,6 +28,7 @@ spec:
|
||||||
operator: In
|
operator: In
|
||||||
values:
|
values:
|
||||||
{{- toYaml .Values.masterNode.values | nindent 18 }}
|
{{- toYaml .Values.masterNode.values | nindent 18 }}
|
||||||
|
{{- end }}
|
||||||
serviceAccountName: {{ include "easyhaproxy.serviceAccountName" . }}
|
serviceAccountName: {{ include "easyhaproxy.serviceAccountName" . }}
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,8 @@ easyhaproxy:
|
||||||
certbot:
|
certbot:
|
||||||
email: ""
|
email: ""
|
||||||
|
|
||||||
# Make sure to create this
|
# Master node configuration - only used when service.create is false (DaemonSet mode)
|
||||||
|
# When service.create is true (Deployment with ClusterIP/NodePort), this is ignored
|
||||||
masterNode:
|
masterNode:
|
||||||
label: easyhaproxy/node
|
label: easyhaproxy/node
|
||||||
values:
|
values:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue