pepr 0.1.32 → 0.1.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pepr",
3
- "version": "0.1.32",
3
+ "version": "0.1.34",
4
4
  "description": "Kubernetes application engine",
5
5
  "author": "Defense Unicorns",
6
6
  "homepage": "https://github.com/defenseunicorns/pepr",
@@ -32,7 +32,7 @@
32
32
  "prettier": "npx prettier src --check",
33
33
  "prettier:fix": "npm run prettier -- --write",
34
34
  "prepublishOnly": "rm -fr dist/* && npm run lint:fix && npm run prettier:fix && npm run test && npm run build",
35
- "e2e-dev-setup": "k3d cluster delete pepr-dev && k3d cluster create pepr-dev",
35
+ "e2e-dev-setup": "k3d cluster delete pepr-dev && k3d cluster create pepr-dev --k3s-arg '--debug@server:0'",
36
36
  "e2e-dev": "npm run build && docker buildx build --tag pepr:dev . && k3d image import pepr:dev -c pepr-dev && node dist/pepr-cli.js deploy -f -i pepr:dev"
37
37
  },
38
38
  "dependencies": {
@@ -30,7 +30,7 @@ function processor(config, capabilities, req) {
30
30
  // Add annotations to the request to indicate that the capability started processing
31
31
  // this will allow tracking of failed mutations that were permitted to continue
32
32
  const { metadata } = wrapped.Raw;
33
- const identifier = `pepr.dev/${config.uuid}/${name}`;
33
+ const identifier = `${config.uuid}.pepr.dev/${name}`;
34
34
  metadata.annotations = metadata.annotations || {};
35
35
  metadata.annotations[identifier] = "started";
36
36
  try {
@@ -61,7 +61,9 @@ function processor(config, capabilities, req) {
61
61
  // Only add the patch if there are patches to apply
62
62
  if (patches.length > 0) {
63
63
  response.patchType = "JSONPatch";
64
- response.patch = JSON.stringify(patches);
64
+ // Webhook must be base64-encoded
65
+ // https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#response
66
+ response.patch = Buffer.from(JSON.stringify(patches)).toString("base64");
65
67
  }
66
68
  // Remove the warnings array if it's empty
67
69
  if (response.warnings.length < 1) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pepr",
3
- "version": "0.1.32",
3
+ "version": "0.1.34",
4
4
  "description": "Kubernetes application engine",
5
5
  "author": "Defense Unicorns",
6
6
  "homepage": "https://github.com/defenseunicorns/pepr",
@@ -32,7 +32,7 @@
32
32
  "prettier": "npx prettier src --check",
33
33
  "prettier:fix": "npm run prettier -- --write",
34
34
  "prepublishOnly": "rm -fr dist/* && npm run lint:fix && npm run prettier:fix && npm run test && npm run build",
35
- "e2e-dev-setup": "k3d cluster delete pepr-dev && k3d cluster create pepr-dev",
35
+ "e2e-dev-setup": "k3d cluster delete pepr-dev && k3d cluster create pepr-dev --k3s-arg '--debug@server:0'",
36
36
  "e2e-dev": "npm run build && docker buildx build --tag pepr:dev . && k3d image import pepr:dev -c pepr-dev && node dist/pepr-cli.js deploy -f -i pepr:dev"
37
37
  },
38
38
  "dependencies": {