Currently, the InitContainers section in the vtbackup pod spec does not expose the ability to define container resources.
This causes the deployment to fail in k8s clusters that enforce setting container resources.
13m Warning CreateFailed vitessshard/vtcluster-test-unsharded-x-x-95cb1c8e failed to create Pod vtcluster-test-unsharded-x-x-vtbackup-init-1dbe7505: pods "vtcluster-test-unsharded-x-x-vtbackup-init-1dbe7505" is forbidden: failed quota: platform-dbtech-vt16-override-test-resources: must specify limits.memory for: init-vt-root; requests.cpu for: init-vt-root; requests.memory for: init-vt-root
We workaround this issue by defining a limitrange such as this
apiVersion: v1
kind: LimitRange
metadata:
name: limitrange
spec:
limits:
- default:
memory: 512Mi
defaultRequest:
cpu: "1"
memory: 512Mi
type: Container
Ask: Would be good to expose this ability so that we can get away from relying on the limitrange.
Currently, the
InitContainerssection in the vtbackup pod spec does not expose the ability to define container resources.This causes the deployment to fail in k8s clusters that enforce setting container resources.
We workaround this issue by defining a
limitrangesuch as thisAsk: Would be good to expose this ability so that we can get away from relying on the limitrange.