mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-02 13:18:38 +09:00
serveSDN=false removed only the sdn APIService. The binary still installed the group, so its /openapi/v3 index kept listing apis/sdn.cozystack.io/v1alpha1 beside the server that owns the group (cozyplane-apiserver in the cozyplane variant). kube-aggregator merges every APIService backend's index and serves a group-version from whichever backend it meets first in map order, so the index hash and the spec request often land on different backends. The backend answers the stale hash with a 301, the aggregator refuses to forward it, and `kubectl explain` fails for every kind in the group with "the backend attempted to redirect this request, which is not permitted"; when the two do match, kubectl gets cozystack-api's SecurityGroup-only spec and reports the other kinds as missing. The chart now passes --serve-sdn=false with serveSDN off, and the server then leaves the group uninstalled. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
54 lines
1.4 KiB
YAML
54 lines
1.4 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: cozystack-api
|
|
namespace: cozy-system
|
|
labels:
|
|
app: cozystack-api
|
|
spec:
|
|
replicas: {{ .Values.cozystackAPI.replicas }}
|
|
selector:
|
|
matchLabels:
|
|
app: cozystack-api
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: cozystack-api
|
|
spec:
|
|
tolerations:
|
|
- operator: Exists
|
|
serviceAccountName: cozystack-api
|
|
affinity:
|
|
nodeAffinity:
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
|
- weight: 100
|
|
preference:
|
|
matchExpressions:
|
|
- key: node-role.kubernetes.io/control-plane
|
|
operator: Exists
|
|
containers:
|
|
- name: cozystack-api
|
|
args:
|
|
- --tls-cert-file=/tmp/cozystack-api-certs/tls.crt
|
|
- --tls-private-key-file=/tmp/cozystack-api-certs/tls.key
|
|
{{- if not .Values.cozystackAPI.serveSDN }}
|
|
- --serve-sdn=false
|
|
{{- end }}
|
|
image: "{{ .Values.cozystackAPI.image }}"
|
|
ports:
|
|
- containerPort: 443
|
|
name: https
|
|
volumeMounts:
|
|
- name: cozystack-api-certs
|
|
mountPath: /tmp/cozystack-api-certs
|
|
readOnly: true
|
|
{{- with .Values.cozystackAPI.resources }}
|
|
resources:
|
|
{{- toYaml . | nindent 10 }}
|
|
{{- end }}
|
|
volumes:
|
|
- name: cozystack-api-certs
|
|
secret:
|
|
secretName: cozystack-api-cert
|
|
defaultMode: 0400
|