Skip to content

feat: give mutators a clusterGetter function #514

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

Merged
merged 2 commits into from
Apr 16, 2024
Merged

Conversation

faiq
Copy link
Contributor

@faiq faiq commented Apr 15, 2024

What problem does this PR solve?:
Adds a reusable function across mutators to return a cluster. This is lazily evaluated and happens once per mutation

Which issue(s) this PR fixes:

How Has This Been Tested?:

tested manually be creating a docker cluster

apiVersion: v1
items:
- apiVersion: controlplane.cluster.x-k8s.io/v1beta1
  kind: KubeadmControlPlane
  metadata:
    annotations:
      cluster.x-k8s.io/cloned-from-groupkind: KubeadmControlPlaneTemplate.controlplane.cluster.x-k8s.io
      cluster.x-k8s.io/cloned-from-name: docker-quick-start-control-plane
    creationTimestamp: "2024-04-15T21:20:06Z"
    finalizers:
    - kubeadm.controlplane.cluster.x-k8s.io
    generation: 1
    labels:
      cluster.x-k8s.io/cluster-name: docker-cluster-cilium-helm-addon
      topology.cluster.x-k8s.io/owned: ""
    name: docker-cluster-cilium-helm-addon-kr6lc
    namespace: default
    ownerReferences:
    - apiVersion: cluster.x-k8s.io/v1beta1
      blockOwnerDeletion: true
      controller: true
      kind: Cluster
      name: docker-cluster-cilium-helm-addon
      uid: d7d3b9b5-3a4c-4a2f-b5b1-1b46b3c6f9e9
    resourceVersion: "2512"
    uid: 11809f5a-5202-4fac-bd7b-7c96b17d437c
  spec:
    kubeadmConfigSpec:
      clusterConfiguration:
        apiServer:
          certSANs:
          - localhost
          - 127.0.0.1
          - 0.0.0.0
          - host.docker.internal

Special notes for your reviewer:

@faiq faiq force-pushed the faiq/clusters-4-all branch 3 times, most recently from b3c1870 to 3c86792 Compare April 15, 2024 22:39
@supershal supershal changed the title feat: give mutators a getCluster funcion feat: give mutators a getCluster function Apr 15, 2024
@github-actions github-actions bot added feature and removed feature labels Apr 15, 2024
@faiq faiq force-pushed the faiq/clusters-4-all branch from 2b26eb4 to 81eb47a Compare April 16, 2024 15:40
@faiq faiq changed the title feat: give mutators a getCluster function feat: give mutators a clusterGetter function Apr 16, 2024
@github-actions github-actions bot added feature and removed feature labels Apr 16, 2024
jimmidyson added a commit that referenced this pull request Apr 16, 2024
@faiq faiq changed the base branch from faiq/docker-sans to main April 16, 2024 16:25
@github-actions github-actions bot added feature and removed feature labels Apr 16, 2024
@jimmidyson jimmidyson enabled auto-merge (squash) April 16, 2024 17:07
Copy link
Contributor

@supershal supershal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for generic solution.

@faiq faiq force-pushed the faiq/clusters-4-all branch from 0b0f17f to fda947c Compare April 16, 2024 17:37
@jimmidyson jimmidyson merged commit 113f9db into main Apr 16, 2024
29 of 30 checks passed
@jimmidyson jimmidyson deleted the faiq/clusters-4-all branch April 16, 2024 19:50
@jimmidyson jimmidyson mentioned this pull request Apr 17, 2024
faiq added a commit that referenced this pull request Apr 17, 2024
…#519)

<!--
 Copyright 2023 D2iQ, Inc. All rights reserved.
 SPDX-License-Identifier: Apache-2.0
 -->
**What problem does this PR solve?**:

https://jira.nutanix.com/browse/D2IQ-100340 Adds docker sans through
mutation handler using the new functionality in #514


**Which issue(s) this PR fixes**:
Fixes #

**How Has This Been Tested?**:
<!--
Please describe the tests that you ran to verify your changes.
Provide output from the tests and any manual steps needed to replicate
the tests.
-->

Tested manually by creating a docker cluster.

**Special notes for your reviewer**:
<!--
Use this to provide any additional information to the reviewers.
This may include:
- Best way to review the PR.
- Where the author wants the most review attention on.
- etc.
-->
Depends on #514.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants