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

consider, for configmap, binaryData direct support #51

Closed
3 tasks done
ldemailly opened this issue Oct 31, 2023 · 2 comments
Closed
3 tasks done

consider, for configmap, binaryData direct support #51

ldemailly opened this issue Oct 31, 2023 · 2 comments

Comments

@ldemailly
Copy link
Member

ldemailly commented Oct 31, 2023

It may be a bit of an issue for both the displaying of the current value (in web ui for instance) and the inability to put said data in a flag on the commandline (unless command line would use base64 for instance)

  • test that a confimap binaryData really ends up as binary once mounted
  • add binary type with base64 for cli and no base64 for cmap (well... optionally... people might still prefer not having binary)
  • special handling in configmap
@ldemailly
Copy link
Member Author

verified cmap binaryData is indeed converted to binary

apiVersion: v1
kind: ConfigMap
metadata:
  name: cmap
data:
  normalKey: "normal value"
binaryData:
  # $ echo -e -n '\00\01\02\03Binary\nData!' | base64
  binaryKey: "AAECA0JpbmFyeQpEYXRhIQ=="
---
apiVersion: v1
kind: Pod
metadata:
  name: debug-pod
spec:
  containers:
  - name: debug-container
    image: busybox
    command: ["sh", "-c", "sleep 3600"]
    volumeMounts:
    - name: config-volume
      mountPath: /tmp/cmap
  volumes:
  - name: config-volume
    configMap:
      name: cmap
# kubectl exec -ti debug-pod -- sh
# cd /tmp/cmap and confirm binaryKey is indeed there in binary (starts with ^@^A^B...)

@ldemailly
Copy link
Member Author

implemented in 1.17.0

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

No branches or pull requests

1 participant