Kubernetes Server-Side Apply
# 🌱|help-and-getting-started
Is there a way to get garden to provide
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
Copy code
apiVersion: v1
kind: ConfigMap
  name: password-blacklist
  blacklist.txt: |
Copy code
kind: Module
type: kubernetes
name: password-blacklist
  - password-blacklist.yaml
log snippet:
Copy code
              apply --output=json -f -
          stderr: >-
              The ConfigMap "password-blacklist" is invalid:
              metadata.annotations: Too long: must have at most 262144 bytes
👋 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
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?
it was a password blacklist to mount into a keycloak container
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.
i didnt end up needing it but this is still something garden could support
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
i think i have now a similiar issue with adding crds of tidb 😮 https://github.com/pingcap/tidb-operator/blob/master/manifests/crd/v1/pingcap.com_tidbclusters.yaml
@quaint-dress-831 i made some suggestions how to implement such a feature in the feature request ticket: https://github.com/garden-io/garden/issues/3839#issuecomment-2119990864 Can you maybe have a look and if you have another suggestion how to implement this pls let me know. Then i can try to create a PR based on this 🙂 At the moment i prefer
to open a range of special cases. It's a little bit complicated but i think an already a known syntax for garden 🙂
@gentle-umbrella-55872 I'm no longer working at garden.io but I do know the team monitors GitHub issues 🙂
Hi @quaint-dress-831 Thank you for your response! I appreciate the information. I will continue to follow up on the GitHub issue and look forward to any feedback from the team.
Hi @gentle-umbrella-55872 that's a totally valid issue and we'll talk about in the next sprint planning. I loved the suggestions, thank you so much for putting effort into it. We were discussing that maybe a solution in-between two of your syntax proposals would be great. I think it's best if we continue the convo on GitHub, and I'll make sure folks are going to discuss what's the best option framework-wise and support you if you want to open a PR for this. cc @curved-intern-91221 @swift-garage-61180 Also, hi @quaint-dress-831 👋