Skip to content

Overwrite provider manager flags #836

@nikParasyr

Description

@nikParasyr

User Story

I would like to be able to overwrite flags on the manager container that are set by default by the provider.

Detailed Description

Each provider sets some defaults flags. For example (for cluster-api core provider 1.8.5):

        - --diagnostics-address=:8443
        - --insecure-diagnostics=false
        - --use-deprecated-infra-machine-naming=false

I would like to be able to overwrite some of them.
When trying to use spec.manager.additionalArgs I get an error for duplicate args(in this case for the openstack infra provider, but im able to replicate on core providers as well):

E0625 14:43:25.629951 1 controller.go:347] "Reconciler error" err="failed to customize manager container: arg "--diagnostics-address" already exists" controller="infrastructureprovider" controllerGroup="operator.cluster.x-k8s.io" controllerKind="InfrastructureProvider" InfrastructureProvider="capo-system/openstack" namespace="capo-system" name="openstack" reconcileID="b0de390a-2830-4575-b5b9-6cea2e555796"

Anything else you would like to add:

cluster-api-operator version: v0.20.0
Simple core provider definition to replicate this:

apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: CoreProvider
metadata:
  namespace: capi-system
  name: cluster-api
spec:
  version: v1.8.5
  manager:
    verbosity: 2
    featureGates:
      MachinePool: true
      ClusterTopology: true
      RuntimeSDK: true
      MachineSetPreflightChecks: false
    additionalArgs:
      --diagnostics-address=0.0.0.0:8443

Note: We specifically hit this issue with diagnostics-address, I see there is a spec.manager.metrics object but this writes the --metrics-bind-addr flag ( which has been deprecated in many providers ) and not the diagnostics one. A similar field for the diagnostics would work for our current use case but I think the problem is a bit more generic with not being able to overwrite default flags of a provider

/kind feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions