Giter VIP home page Giter VIP logo

Comments (6)

willie-yao avatar willie-yao commented on September 27, 2024 1

@thefirstofthe300 Thanks so much for the info! I have been trying to see why this isn't working in CAPZ since they mentioned this working for the VSphere provider. All logic that involves namingStrategy happens in CAPI so it is probably a CAPI issue. @arno-pons would you be able to create an issue in CAPI for this?

from cluster-api-provider-azure.

willie-yao avatar willie-yao commented on September 27, 2024

Hi @arno-pons! Adding the namingStrategy field to the controlPlane spec only applies the strategy to the controlplane resources such as kubeadmcontrolplane. You can specify namingStrategy for your machineDeployments or machinePools workers and the names of the Azure resources should match the namingStrategy.

I just verified this by adding namingStrategy like so:

---
apiVersion: cluster.x-k8s.io/v1beta1
kind: ClusterClass
metadata:
  name: my-cc
  namespace: default
spec:
  workers:
    machineDeployments:
    - class: ${CLUSTER_NAME}-worker
      namingStrategy:
        template: "{{ .cluster.name }}-foo-{{ .random }}"

kubectl get azuremachine shows the following:

NAME                                             READY   SEVERITY   REASON                    STATE   AGE
willie-clusterclass-9406-foo-44xp6-8rn9x         False   Info       Creating                          70s
willie-clusterclass-9406-foo-rb6ps-rpr7f-pj6zt   False   Info       WaitingForBootstrapData           4m33s
willie-clusterclass-9406-foo-rb6ps-rpr7f-xrjnn   False   Info       WaitingForBootstrapData           4m33s

Let me know if this works for you!

from cluster-api-provider-azure.

arno-pons avatar arno-pons commented on September 27, 2024

Hi @willie-yao,

Thanks for you feedback.

My issue is related to the name of control plane azuremachine, not worker ones.
For the worker, we are agree that the namingStrategy at machineDeployments level is working well.

But for controle plane nodes, the only field available for naming strategy, from my understanding, is the spec.controlPlane.namingStrategy.template. And as you say, it seems to apply at kubeadmcontrolplane object level only.

Any idea how to set naming strategy for control plane azure machines/VMs ?

from cluster-api-provider-azure.

thefirstofthe300 avatar thefirstofthe300 commented on September 27, 2024

I think this might be a CAPI core bug. I just hit this exact same behavior despite using the AWS provider instead.

from cluster-api-provider-azure.

k8s-triage-robot avatar k8s-triage-robot commented on September 27, 2024

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

from cluster-api-provider-azure.

willie-yao avatar willie-yao commented on September 27, 2024

/remove-lifecycle stale

from cluster-api-provider-azure.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.