Skip to content
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

custom resource specs (cpu/mem requests/limits) of healthcheck container in challenge manifest has no effect #387

Open
phongvq opened this issue Nov 28, 2022 · 1 comment

Comments

@phongvq
Copy link

phongvq commented Nov 28, 2022

Summary

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

Expected behaviour

Resource specs of healthcheck container in deployment must be same as what specified in challenge.yaml.

@phongvq
Copy link
Author

phongvq commented Nov 28, 2022

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)

@phongvq phongvq changed the title Cannot specify custom resource specs (cpu/mem requests/limits) of healthcheck container custom resource specs (cpu/mem requests/limits) of healthcheck container in challenge manifest has no effect Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant