Kubernetes Server-Side Apply
# 🌱|help-and-getting-started
m
Is there a way to get garden to provide
--server-side
to
kubectl apply
when applying kubenetes manifests? https://kubernetes.io/docs/reference/using-api/server-side-apply/ I'm trying to create a ~1mb configmap with garden and because of limitations with kubectl apply it fails due to being bigger than ~256kb
password-blacklist.yaml
Copy code
apiVersion: v1
kind: ConfigMap
metadata:
  name: password-blacklist
data:
  blacklist.txt: |
    123456
    password
    12345678
    qwerty
    123456789
    12345
garden.yml
Copy code
kind: Module
type: kubernetes
name: password-blacklist
files:
  - password-blacklist.yaml
log snippet:
Copy code
kubectl
              apply --output=json -f -
          stderr: >-
              The ConfigMap "password-blacklist" is invalid:
              metadata.annotations: Too long: must have at most 262144 bytes
q
👋 I'm checking with the team on this but most likely it's not supported
It's not supported but please create a feature request if you're interested in seeing it included in a future release. Most of Garden's technical side is heads-down working on 0.13 so if you're seeing a lot of issues unaddressed that's why. Once it's shipped we'll get everybody going through the backlog
m
b
This is also the first time I see a configmap this big, perhaps it might be better to mount a persistent volume instead or leveraging a cache service like redis?
m
it was a password blacklist to mount into a keycloak container
b
There are a couple workarounds I could recommend to fix the issue; 1. Store the blacklist externally: You could store the password blacklist in an external system, such as a database, file storage service, or object store. You can then mount the external storage into your container using a volume mount. This approach requires additional setup and configuration, but it allows you to store large amounts of data and manage it separately from your Kubernetes cluster. 2. Split the file into multiple ConfigMaps: you can split the password blacklist into multiple ConfigMaps and mount them as separate files in your container. However, this approach may require additional scripting or tooling to merge the files into a single blacklist.
m
i didnt end up needing it but this is still something garden could support
q
I agree and let's make these feature requests even when it's just a nice to have: @mammoth-flag-56137 you don't need to make it exhaustive, leave that to us but it's best when it's created by a user. A three sentence issue up on GitHub is totally ok
3 Views