phenixblue / imageswap-webhook

Image Swap Mutating Admission Webhook for Kubernetes
Apache License 2.0
154 stars 52 forks source link

Update mapfile separator :: (new syntax) #95

Open zillani opened 1 year ago

zillani commented 1 year ago

In Mapfile, the syntax : is deprecated as of v1.4.3 and will be removed in future versions. Map file configurations should use the new syntax ie. ::

phenixblue commented 1 year ago

@zillani Do you need help troubleshooting the CI issue?

zillani commented 1 year ago

@zillani Do you need help troubleshooting the CI issue?

Hey @phenixblue Thanks for the response, let me check this today & get back.

zillani commented 1 year ago

@zillani Do you need help troubleshooting the CI issue?

Hey @phenixblue Thanks for the response, let me check this today & get back.

@phenixblue need some help, I tried make build-single-manifest , but its not formatting install manifest properly.

phenixblue commented 1 year ago

Ok. I'm going to try and take a look within the next couple of days. Can you post a snippet that shows how make build-single-manifest is formatting things within install.yaml?

zillani commented 1 year ago

Ok. I'm going to try and take a look within the next couple of days. Can you post a snippet that shows how make build-single-manifest is formatting things within install.y'all?

sure, imageswap-mwc is formatted like this, reset for the manifest file is same,


apiVersion: v1
data:
  imageswap-mwc: "apiVersion: admissionregistration.k8s.io/v1\r\nkind: MutatingWebhookConfiguration\r\nmetadata:\r\n
    \ name: imageswap-webhook\r\n  labels:\r\n    app: imageswap\r\n    resource:
    mutatingwebhookconfiguration\r\nwebhooks:\r\n  - name: imageswap.webhook.k8s.twr.io\r\n
    \   clientConfig:\r\n      service:\r\n        name: imageswap\r\n        namespace:
    imageswap-system\r\n        path: \"/\"\r\n      caBundle: $CA_BUNDLE\r\n    rules:\r\n
    \     - operations:\r\n          - CREATE\r\n          - UPDATE\r\n        apiGroups:\r\n
    \         - \"*\"\r\n        apiVersions:\r\n          - \"*\"\r\n        resources:\r\n
    \         - \"pods\"\r\n    sideEffects: None\r\n    admissionReviewVersions:
    [\"v1\"]\r\n    failurePolicy: Fail\r\n    reinvocationPolicy: IfNeeded\r\n    namespaceSelector:\r\n
    \     matchLabels:\r\n        k8s.twr.io/imageswap: \"enabled\"\r\n"
kind: ConfigMap
metadata:
  creationTimestamp: null
  name: imageswap-mwc-template
  namespace: imageswap-system

---
apiVersion: v1
data:
  maps: "default:registry.example.com\r\n"
kind: ConfigMap
metadata:
phenixblue commented 1 year ago

@zillani , Sorry, I'm just now getting around to dig into this. It looks like you changed the separator in install.yaml, but that file is automatically generated. You need to update /deploy/manifests/imageswap-maps.conf, then generate a new install.yaml file by running make build-single-manifest. Let me know if that doesn't work for you.

phenixblue commented 9 months ago

@zillani It looks like you need to run make build-single-manifest now that the template has been updated. This should clear up the tests that are failing