cluster-api-operator icon indicating copy to clipboard operation
cluster-api-operator copied to clipboard

Customresource `spec.deployment` is only a limited subset

Open johanjk opened this issue 1 year ago • 4 comments

When setting overrides on the deployment, only the following parameters are available:

spec:
  deployment: 
    affinity: [...]
    containers: [...]
    imagePullSecret: [...]
    nodeSelector: [...]
    replicas: [...]
    serviceAccountName: [...]
    tolerations: [...]

I would like to be able to configure, amongst other things spec.strategy. Could the operator allow the full deployment spec to be configured?

/kind feature

johanjk avatar Nov 10 '23 13:11 johanjk

/triage accepted

alexander-demicev avatar Nov 13 '23 10:11 alexander-demicev

This can be added to our deployment spec in provider's API

alexander-demicev avatar Nov 13 '23 10:11 alexander-demicev

Hey @johanjk @alexander-demicev. I've been taking a look at this and, assuming the fields of interest are the ones in DeploymentSpec here, there are a few of them that are not optional. Is it expected to support overriding only a selection of these fields or would it be useful to have this struct embedded inline and have access to all fields considering some of them would be required?

salasberryfin avatar Dec 28 '23 20:12 salasberryfin

@salasberryfin We had a bad experience with embedding structures in API, if something changes in the structure our API can get broken

alexander-demicev avatar Mar 13 '24 15:03 alexander-demicev

Hey @johanjk you can use manifest patch to apply things which are not supported by default spec: https://cluster-api-operator.sigs.k8s.io/03_topics/02_configuration/04_patching-provider-manifests

Danil-Grigorev avatar Sep 18 '24 16:09 Danil-Grigorev

Hey @johanjk you can use manifest patch to apply things which are not supported by default spec

Based on ^, closing this.

furkatgofurov7 avatar Sep 18 '24 16:09 furkatgofurov7