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

Fix SSA migration field managers #189

Merged
merged 1 commit into from Sep 29, 2023

Conversation

erikgb
Copy link
Contributor

@erikgb erikgb commented Sep 28, 2023

This PR adapts the SSA migration code to the controller-runtime regression introduced in c/r version 0.15.0 and fixed by kubernetes-sigs/controller-runtime#2435.

/cc @inteon

Signed-off-by: Erik Godding Boye <egboye@gmail.com>
@jetstack-bot jetstack-bot added dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 28, 2023
@erikgb
Copy link
Contributor Author

erikgb commented Sep 28, 2023

/retest

@inteon
Copy link
Member

inteon commented Sep 28, 2023

Have you tested running an old trust-manager version to confirm that the field manager is correct? I didn't do this previously but I realised that it is more important than first thought.

@erikgb
Copy link
Contributor Author

erikgb commented Sep 28, 2023

Have you tested running an old trust-manager version to confirm that the field manager is correct? I didn't do this previously but I realised that it is more important than first thought.

Good point. With version 0.5.0 of trust-manager, I get this:

$ k get configmaps -n default example-bundle -o json --show-managed-fields=true | jq '.metadata.managedFields'
[
  {
    "apiVersion": "v1",
    "fieldsType": "FieldsV1",
    "fieldsV1": {
      "f:data": {
        ".": {},
        "f:trust-bundle.pem": {}
      },
      "f:metadata": {
        "f:ownerReferences": {
          ".": {},
          "k:{\"uid\":\"a5814f40-1e51-422c-98b4-890874ddd0b2\"}": {}
        }
      }
    },
    "manager": "trust-manager",
    "operation": "Update",
    "time": "2023-09-28T20:01:21Z"
  }
]

And with version 0.6.0 this:

$ k get configmaps -n default example-bundle -o json --show-managed-fields=true | jq '.metadata.managedFields'
[
  {
    "apiVersion": "v1",
    "fieldsType": "FieldsV1",
    "fieldsV1": {
      "f:data": {
        ".": {},
        "f:trust-bundle.pem": {}
      },
      "f:metadata": {
        "f:ownerReferences": {
          ".": {},
          "k:{\"uid\":\"03db27c7-0cf9-4ae3-a3de-ad95b9eda556\"}": {}
        }
      }
    },
    "manager": "Go-http-client",
    "operation": "Update",
    "time": "2023-09-28T20:08:27Z"
  }
]

@erikgb
Copy link
Contributor Author

erikgb commented Sep 28, 2023

/retest

1 similar comment
@erikgb
Copy link
Contributor Author

erikgb commented Sep 29, 2023

/retest

@inteon
Copy link
Member

inteon commented Sep 29, 2023

Thanks for finding the reason we were seeing this Go-http-client name in certain older versions & for making the migration path more robust.
/approve
/lgtm

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 29, 2023
@jetstack-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: inteon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jetstack-bot jetstack-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 29, 2023
@jetstack-bot jetstack-bot merged commit e96b158 into cert-manager:main Sep 29, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants