silver-surfer icon indicating copy to clipboard operation
silver-surfer copied to clipboard

Unable to make exclusion work

Open ssarbadh opened this issue 1 year ago • 1 comments

I have 8 files in a directory

bash-5.1$ tree /Users/soham/workstation/workspace-1/ct-argo-k8s-prod-apps-manifests/microservices/devops/devops-release-tracker
/Users/soham/workstation/workspace-1/ct-argo-k8s-prod-apps-manifests/microservices/devops/devops-release-tracker
├── argoNotifiication.yaml
├── configmap.yaml
├── deployment.yaml
├── hpa.yaml
├── ingress.yaml
├── pdb.yaml
├── secret.yaml
└── service.yaml

apiVersion in hpa.yaml is outdated apiVersion in secret.yaml is a CRD (SealedSecret) - I don't wish it to be checked or scanned

As I run the below command

./kubedd -d /Users/soham/workstation/workspace-1/ct-argo-k8s-prod-apps-manifests/microservices/devops/devops-release-tracker --source-kubernetes-version 1.26 --target-kubernetes-version 1.27 --ignored-filename-patterns ^secret\..*$

It fails with

Results for file /Users/soham/workstation/workspace-1/ct-argo-k8s-prod-apps-manifests/microservices/devops/devops-release-tracker/secret.yaml
-------------------------------------------
>>>> Removed API Version's <<<<
 Namespace   Name                            Kind           API Version (Current Available)   Replace With API Version (Latest Available)   Migration Status
 devops      devops-release-tracker-secret   SealedSecret   bitnami.com/v1alpha1                                                            Alert! cannot migrate kubernetes version

And if I try

./kubedd -d /Users/soham/workstation/workspace-1/ct-argo-k8s-prod-apps-manifests/microservices/devops/devops-release-tracker --source-kubernetes-version 1.26 --target-kubernetes-version 1.27 --ignore-kinds SealedSecret

Same issue

Results for file /Users/soham/workstation/workspace-1/ct-argo-k8s-prod-apps-manifests/microservices/devops/devops-release-tracker/secret.yaml
-------------------------------------------
>>>> Removed API Version's <<<<
 Namespace   Name                            Kind           API Version (Current Available)   Replace With API Version (Latest Available)   Migration Status
 devops      devops-release-tracker-secret   SealedSecret   bitnami.com/v1alpha1                                                            Alert! cannot migrate kubernetes version

How do I ignore secret.yaml or SealedSecret ?

Please help.

ssarbadh avatar Jan 11 '24 13:01 ssarbadh

Update - this worked

./kubedd -d /Users/soham/workstation/workspace-1/ct-argo-k8s-prod-apps-manifests/microservices/devops/devops-release-tracker --source-kubernetes-version 1.26 --target-kubernetes-version 1.27  --ignored-filename-patterns 'secret\.yaml$'

But still would want to figure out why Kind did not work - Please suggest

ssarbadh avatar Jan 11 '24 13:01 ssarbadh