Open phongvq opened 1 year ago
Regardless of resources spec (cpu / mem requests / limits) of healthcheck container in challenge manifest,
# challenge manifest apiVersion: kctf.dev/v1 kind: Challenge metadata: annotations: {} name: asf namespace: default status: health: healthy status: Running spec: deployed: true healthcheck: enabled: true image: >- aaaa image: >- aaaa network: ports: - domains: - adsf.a.a. name: ext protocol: TCP targetPort: 1337 public: false podTemplate: template: spec: containers: - name: challenge resources: requests: cpu: 1m memory: 1Mi - name: healthcheck resources: requests: cpu: 1m memory: 1Mi
resource spec of container in deployment is always set as below.
# created deployment - name: healthcheck image: >- abc resources: limits: cpu: '1' requests: cpu: 50m
Resource specs of healthcheck container in deployment must be same as what specified in challenge.yaml.
I suspect this line of code https://github.com/google/kctf/blob/v1/kctf-operator/controllers/deployment/deployment-with-healthcheck.go#L64 caused the issue (hard-coded healthcheck container resource spec)
Summary
Regardless of resources spec (cpu / mem requests / limits) of healthcheck container in challenge manifest,
resource spec of container in deployment is always set as below.
Expected behaviour
Resource specs of healthcheck container in deployment must be same as what specified in challenge.yaml.