Skip to content
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

remove faulty regex and remove labels from awsmachinetemplate specs #401

Merged
merged 4 commits into from
Oct 24, 2023

Conversation

bdehri
Copy link
Contributor

@bdehri bdehri commented Oct 23, 2023

What this PR does / why we need it

We introduced regexReplace with this commit to prevent unnecessary node rolling which caused no node rolling at all. Instead of removing respective label via regex, all label related sections were moved to AWSMachineTemplate manifests directly.

Checklist

  • Update changelog in CHANGELOG.md.

Trigger e2e tests

/run cluster-test-suites

@bdehri bdehri self-assigned this Oct 23, 2023
@bdehri
Copy link
Contributor Author

bdehri commented Oct 23, 2023

/run cluster-test-suites

@bdehri bdehri changed the title remove faulty regex and remove labels from awsmachinetemplatestacks remove faulty regex and remove labels from awsmachinetemplate manifests Oct 23, 2023
@bdehri
Copy link
Contributor Author

bdehri commented Oct 23, 2023

/run cluster-test-suites

Copy link
Contributor

@AndiDog AndiDog left a comment

Choose a reason for hiding this comment

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

Good idea, and xxx-spec now actually means what it says 😄 Ping me when this is tested and ready for review.

helm/cluster-aws/templates/_bastion.tpl Outdated Show resolved Hide resolved
@tinkerers-ci
Copy link

tinkerers-ci bot commented Oct 23, 2023

cluster-test-suites

Run name pr-cluster-aws-401-cluster-test-suiteshvksd
Commit SHA dc2a588
Result Failed ❌

📋 View full results in Tekton Dashboard

Rerun trigger:
/run cluster-test-suites

@tinkerers-ci
Copy link

tinkerers-ci bot commented Oct 23, 2023

cluster-test-suites

Run name pr-cluster-aws-401-cluster-test-suitesxkbm6
Commit SHA e582e88
Result Failed ❌

📋 View full results in Tekton Dashboard

Rerun trigger:
/run cluster-test-suites

@github-actions
Copy link
Contributor

(helm/cluster-aws/ci/test-wc-minimal-values.yaml) rendered manifest diff
(file level)
  - two documents removed:
    ---
    # Source: cluster-aws/templates/list.yaml
    apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
    kind: AWSMachineTemplate
    metadata:
      name: test-wc-minimal-control-plane-40875668
      namespace: org-giantswarm
      labels:
        cluster.x-k8s.io/role: control-plane
        app: cluster-aws
        app.kubernetes.io/managed-by: Helm
        cluster.x-k8s.io/cluster-name: test-wc-minimal
        giantswarm.io/cluster: test-wc-minimal
        giantswarm.io/organization: test
        cluster.x-k8s.io/watch-filter: capi
        helm.sh/chart: cluster-aws-0.45.0
        application.giantswarm.io/team: phoenix
        app.kubernetes.io/version: 0.45.0
    spec:
      template:
        metadata:
          labels:
            cluster.x-k8s.io/role: control-plane
            app: cluster-aws
            app.kubernetes.io/managed-by: Helm
            cluster.x-k8s.io/cluster-name: test-wc-minimal
            giantswarm.io/cluster: test-wc-minimal
            giantswarm.io/organization: test
            cluster.x-k8s.io/watch-filter: capi
            helm.sh/chart: cluster-aws-0.45.0
            application.giantswarm.io/team: phoenix
        spec:
          ami: {}
          imageLookupBaseOS: flatcar-stable
          imageLookupFormat: capa-ami-{{.BaseOS}}-v{{.K8sVersion}}-gs
          imageLookupOrg: 706635527432
          cloudInit: {}
          instanceType: r6i.xlarge
          nonRootVolumes:
          - type: gp3
            deviceName: /dev/xvdc
            encrypted: true
            size: 100
          - type: gp3
            deviceName: /dev/xvdd
            encrypted: true
            size: 100
          - type: gp3
            deviceName: /dev/xvde
            encrypted: true
            size: 100
          rootVolume:
            type: gp3
            size: 120
          iamInstanceProfile: control-plane-test-wc-minimal
          sshKeyName: 
          subnet:
            filters:
            - name: "tag:kubernetes.io/cluster/test-wc-minimal"
              values:
              - shared
              - owned
            - name: "tag:sigs.k8s.io/cluster-api-provider-aws/role"
              values:
              - private
    # Source: cluster-aws/templates/list.yaml
    apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
    kind: AWSMachineTemplate
    metadata:
      labels:
        cluster.x-k8s.io/role: bastion
        app: cluster-aws
        app.kubernetes.io/managed-by: Helm
        cluster.x-k8s.io/cluster-name: test-wc-minimal
        giantswarm.io/cluster: test-wc-minimal
        giantswarm.io/organization: test
        cluster.x-k8s.io/watch-filter: capi
        helm.sh/chart: cluster-aws-0.45.0
        application.giantswarm.io/team: phoenix
        app.kubernetes.io/version: 0.45.0
      name: test-wc-minimal-bastion-40875668
      namespace: org-giantswarm
    spec:
      template:
        metadata:
          labels:
            cluster.x-k8s.io/role: bastion
            app: cluster-aws
            app.kubernetes.io/managed-by: Helm
            cluster.x-k8s.io/cluster-name: test-wc-minimal
            giantswarm.io/cluster: test-wc-minimal
            giantswarm.io/organization: test
            cluster.x-k8s.io/watch-filter: capi
            helm.sh/chart: cluster-aws-0.45.0
            application.giantswarm.io/team: phoenix
        spec:
          instanceType: t3.small
          cloudInit: {}
          imageLookupBaseOS: flatcar-stable
          imageLookupFormat: capa-ami-{{.BaseOS}}-v{{.K8sVersion}}-gs
          imageLookupOrg: 706635527432
          iamInstanceProfile: test-wc-minimal-bastion
          publicIP: true
          sshKeyName: 
          subnet:
            filters:
            - name: "tag:sigs.k8s.io/cluster-api-provider-aws/role"
              values:
              - public
            - name: "tag:sigs.k8s.io/cluster-api-provider-aws/cluster/test-wc-minimal"
              values:
              - owned
              - shared
    
  
    ---
    # Source: cluster-aws/templates/list.yaml
    apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
    kind: AWSMachineTemplate
    metadata:
      name: test-wc-minimal-control-plane-779bfa58
      namespace: org-giantswarm
      labels:
        cluster.x-k8s.io/role: control-plane
        app: cluster-aws
        app.kubernetes.io/managed-by: Helm
        cluster.x-k8s.io/cluster-name: test-wc-minimal
        giantswarm.io/cluster: test-wc-minimal
        giantswarm.io/organization: test
        cluster.x-k8s.io/watch-filter: capi
        helm.sh/chart: cluster-aws-0.45.0
        application.giantswarm.io/team: phoenix
        app.kubernetes.io/version: 0.45.0
    spec:
      template:
        metadata:
          labels:
            cluster.x-k8s.io/role: control-plane
            app: cluster-aws
            app.kubernetes.io/managed-by: Helm
            cluster.x-k8s.io/cluster-name: test-wc-minimal
            giantswarm.io/cluster: test-wc-minimal
            giantswarm.io/organization: test
            cluster.x-k8s.io/watch-filter: capi
            helm.sh/chart: cluster-aws-0.45.0
            application.giantswarm.io/team: phoenix
        spec:
          ami: {}
          imageLookupBaseOS: flatcar-stable
          imageLookupFormat: capa-ami-{{.BaseOS}}-v{{.K8sVersion}}-gs
          imageLookupOrg: 706635527432
          cloudInit: {}
          instanceType: r6i.xlarge
          nonRootVolumes:
          - type: gp3
            deviceName: /dev/xvdc
            encrypted: true
            size: 100
          - type: gp3
            deviceName: /dev/xvdd
            encrypted: true
            size: 100
          - type: gp3
            deviceName: /dev/xvde
            encrypted: true
            size: 100
          rootVolume:
            type: gp3
            size: 120
          iamInstanceProfile: control-plane-test-wc-minimal
          sshKeyName: 
          subnet:
            filters:
            - name: "tag:kubernetes.io/cluster/test-wc-minimal"
              values:
              - shared
              - owned
            - name: "tag:sigs.k8s.io/cluster-api-provider-aws/role"
              values:
              - private
    # Source: cluster-aws/templates/list.yaml
    apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
    kind: AWSMachineTemplate
    metadata:
      labels:
        cluster.x-k8s.io/role: bastion
        app: cluster-aws
        app.kubernetes.io/managed-by: Helm
        cluster.x-k8s.io/cluster-name: test-wc-minimal
        giantswarm.io/cluster: test-wc-minimal
        giantswarm.io/organization: test
        cluster.x-k8s.io/watch-filter: capi
        helm.sh/chart: cluster-aws-0.45.0
        application.giantswarm.io/team: phoenix
        app.kubernetes.io/version: 0.45.0
      name: test-wc-minimal-bastion-17f76896
      namespace: org-giantswarm
    spec:
      template:
        metadata:
          labels:
            cluster.x-k8s.io/role: bastion
            app: cluster-aws
            app.kubernetes.io/managed-by: Helm
            cluster.x-k8s.io/cluster-name: test-wc-minimal
            giantswarm.io/cluster: test-wc-minimal
            giantswarm.io/organization: test
            cluster.x-k8s.io/watch-filter: capi
            helm.sh/chart: cluster-aws-0.45.0
            application.giantswarm.io/team: phoenix
        spec:
          instanceType: t3.small
          cloudInit: {}
          imageLookupBaseOS: flatcar-stable
          imageLookupFormat: capa-ami-{{.BaseOS}}-v{{.K8sVersion}}-gs
          imageLookupOrg: 706635527432
          iamInstanceProfile: test-wc-minimal-bastion
          publicIP: true
          sshKeyName: 
          subnet:
            filters:
            - name: "tag:sigs.k8s.io/cluster-api-provider-aws/role"
              values:
              - public
            - name: "tag:sigs.k8s.io/cluster-api-provider-aws/cluster/test-wc-minimal"
              values:
              - owned
              - shared
    
  

/spec/machineTemplate/infrastructureRef/name  (KubeadmControlPlane/org-giantswarm/test-wc-minimal)
  ± value change
    - test-wc-minimal-control-plane-40875668
    + test-wc-minimal-control-plane-779bfa58

/spec/template/spec/infrastructureRef/name  (MachineDeployment/org-giantswarm/test-wc-minimal-bastion)
  ± value change
    - test-wc-minimal-bastion-40875668
    + test-wc-minimal-bastion-17f76896

@bdehri
Copy link
Contributor Author

bdehri commented Oct 23, 2023

/run cluster-test-suites

@bdehri bdehri marked this pull request as ready for review October 23, 2023 15:05
@bdehri bdehri requested a review from a team as a code owner October 23, 2023 15:05
@bdehri bdehri changed the title remove faulty regex and remove labels from awsmachinetemplate manifests remove faulty regex and remove labels from awsmachinetemplate specs Oct 23, 2023
Copy link
Contributor

@AndiDog AndiDog left a comment

Choose a reason for hiding this comment

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

LGTM if tested with a workload cluster

@tinkerers-ci
Copy link

tinkerers-ci bot commented Oct 23, 2023

cluster-test-suites

Run name pr-cluster-aws-401-cluster-test-suites69g4n
Commit SHA 37c7707
Result Failed ❌

📋 View full results in Tekton Dashboard

Rerun trigger:
/run cluster-test-suites

@bdehri
Copy link
Contributor Author

bdehri commented Oct 23, 2023

/run cluster-test-suites

@tinkerers-ci
Copy link

tinkerers-ci bot commented Oct 23, 2023

cluster-test-suites

Run name pr-cluster-aws-401-cluster-test-suitesb8rg5
Commit SHA 37c7707
Result Failed ❌

📋 View full results in Tekton Dashboard

Rerun trigger:
/run cluster-test-suites

@bdehri
Copy link
Contributor Author

bdehri commented Oct 23, 2023

/run cluster-test-suites

@tinkerers-ci
Copy link

tinkerers-ci bot commented Oct 23, 2023

cluster-test-suites

Run name pr-cluster-aws-401-cluster-test-suites5znnz
Commit SHA 37c7707
Result Failed ❌

📋 View full results in Tekton Dashboard

Rerun trigger:
/run cluster-test-suites

@bdehri
Copy link
Contributor Author

bdehri commented Oct 23, 2023

/run cluster-test-suites

@tinkerers-ci
Copy link

tinkerers-ci bot commented Oct 23, 2023

cluster-test-suites

Run name pr-cluster-aws-401-cluster-test-suitesqsltg
Commit SHA 37c7707
Result Failed ❌

📋 View full results in Tekton Dashboard

Rerun trigger:
/run cluster-test-suites

@fiunchinho
Copy link
Member

/run cluster-test-suites

@tinkerers-ci
Copy link

tinkerers-ci bot commented Oct 24, 2023

cluster-test-suites

Run name pr-cluster-aws-401-cluster-test-suitesqclxn
Commit SHA 37c7707
Result Failed ❌

📋 View full results in Tekton Dashboard

Rerun trigger:
/run cluster-test-suites

@bdehri
Copy link
Contributor Author

bdehri commented Oct 24, 2023

/run cluster-test-suites

@tinkerers-ci
Copy link

tinkerers-ci bot commented Oct 24, 2023

cluster-test-suites

Run name pr-cluster-aws-401-cluster-test-suiteskwgzk
Commit SHA 37c7707
Result Succeeded ✅

📋 View full results in Tekton Dashboard

Rerun trigger:
/run cluster-test-suites

@bdehri bdehri merged commit 4c7f208 into master Oct 24, 2023
2 checks passed
@bdehri bdehri deleted the fixregex branch October 24, 2023 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants