Skip to content

Conversation

@larkro
Copy link

@larkro larkro commented Sep 22, 2024

First heard out about reclaim-the-stack at BalticRuby. Thank you for making this.

Saw the patchesStrategicMerge deprecation warning and did:
$ cd platform/argocd/
$ kustomize edit fix
$ cd -

Read the note/comment, could the noted validation error be because of file: vs path: ?
I tried to edit using file: as in the note, and got error: invalid Kustomization, but the automated kustomize edit fix is without warnings.

Tested creating/deleting resources:
$ kubectl create -k platform/argocd
$ kubectl delete -k platform/argocd

No warning for me anymore using:
$ kustomize version
v5.4.3
$ kubectl version
Client Version: v1.31.1
Kustomize Version: v5.4.2
Server Version: v1.31.1

@dbackeus
Copy link
Contributor

Thanks for the PR.

Did you also confirm that the patch was correctly applied?

Not sure when I'll have time to verify the stack but I'll definitely verify this at some point.

@larkro
Copy link
Author

larkro commented Sep 23, 2024

Thank you for the swift reply. No stress :-)
Yes, I did a quick check that there was a ConfigMap with what at a glance looked correct.
Sorry for not including that info, here is what it looked like:

$ k k get configmap -n argocd argocd-cm -o yaml

apiVersion: v1
data:
  application.instanceLabelKey: argocd.argoproj.io/instance
  kustomize.buildOptions: --load-restrictor LoadRestrictionsNone --enable-helm
  resource.customizations.health.argoproj.io_Application: |
    hs = {}
    hs.status = "Progressing"
    hs.message = ""
    if obj.status ~= nil then
      if obj.status.health ~= nil then
        hs.status = obj.status.health.status
        if obj.status.health.message ~= nil then
          hs.message = obj.status.health.message
        end
      end
    end
    return hs
  resource.customizations.ignoreDifferences.admissionregistration.k8s.io_MutatingWebhookConfiguration: |
    jqPathExpressions:
      - ".webhooks[]?.clientConfig.caBundle"
      - ".webhooks[]?.failurePolicy"
  resource.customizations.ignoreDifferences.admissionregistration.k8s.io_ValidatingWebhookConfiguration: |
    jqPathExpressions:
      - ".webhooks[]?.clientConfig.caBundle"
      - ".webhooks[]?.failurePolicy"
  resource.customizations.ignoreDifferences.apiextensions.k8s.io_CustomResourceDefinition: |-
    jsonPointers:
      - /spec/names/shortNames
kind: ConfigMap
metadata:
  creationTimestamp: "2024-09-22T07:59:52Z"
  labels:
    app.kubernetes.io/name: argocd-cm
    app.kubernetes.io/part-of: argocd
  name: argocd-cm
  namespace: argocd
  resourceVersion: "9805"
  uid: bb96a3f0-29ac-473e-88ad-7c885b25e6ca

Comment on lines +8 to +9
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

Choose a reason for hiding this comment

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

Suggested change
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

@@ -1,10 +1,11 @@
namespace: argocd

Choose a reason for hiding this comment

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

Suggested change
namespace: argocd
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: argocd

Comment on lines 6 to 7
# NOTE: patchesStrategicMerge is deprecated but still works. Converting to the suggested
# patches: { file: ./config.yaml } syntax results in a validation error.

Choose a reason for hiding this comment

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

Suggested change
# NOTE: patchesStrategicMerge is deprecated but still works. Converting to the suggested
# patches: { file: ./config.yaml } syntax results in a validation error.

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