-
Notifications
You must be signed in to change notification settings - Fork 452
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
GitOps: Support environment variables in configuration profiles #17309
Comments
Hey @getvictor, heads up, we didn't have the space to take this one on in the current design sprint (4.48). Leaving the feature fest label on it so we can weigh it at the next feature fest. |
Hey @getvictor, heads up, we brought this into the upcoming design sprint (4.49). |
examples of variables we would want to support: It would be great if, at any time, a device variable that is used on a profile is updated, that profile will be re-installed on the device with the updated variable. These are some of the variables that were supported by Profile Manager back in the day: https://support.apple.com/en-ca/guide/profile-manager/mdm53kqu8903/mac |
related to #16958 |
I assume you meant The syntax mentioned in #16958 would conflict with this feature because that is the standard syntax for an environment variable: |
There is also a corner case bug with the current env variables support, which is due to golang/go#43482: #18467 |
@getvictor I don't think this has anything to do with environment variables. I think the idea is that when we deliver configuration profiles to devices, Fleet has the ability to populate variable strings in the configuration profile from values in the database before or at the time it's written to the device kind of like the way a here doc works in bash shell. Similar to this: |
@getvictor, I think I meant environment variables. This story addresses the problem in which we want to pass the Chrome enrollment token from an environment variable to a profile w/o having the modify the bash script that the GitHub action runs. Sorry for the confusion.
Thanks for pointing this out! Good to keep in mind when we address that problem.
@nonpunctual this is a separate problem tracked in a user story here: #16958 |
Sory for confusion. |
@noahtalerman If the env var doesn't exist, should we throw an error? Currently, it just becomes blank. This is related to #18467 I suggest we throw an error for this story and for the current env var substitution we do in GitOps. This will prevent customer setting blank options, and will warn them if they are using $SOMETHING syntax without realizing that it will be substituted as env var. |
@getvictor, displaying an easy to understand error message makes sense to me. Nice catch. When you land on an error message can, you please add that to the "Changes" section in this story's description? This way, other folks can give feedback and we know to test the error message during QA. |
#17309 I added some missing env var replacement tests for policies, queries, etc. - [X] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://fleetdm.com/docs/contributing/committing-changes#changes-files) for more information. - [X] Added/updated tests - [X] Manual QA for all new/changed functionality
TODO: docs PR #17890 |
Hey @dherder & @zayhanlon, this customer request is shipped. |
Merging docs is still TODO: #19740 After the docs are merged we can close this user story. |
Config profiles deep, |
Goal
Context
The following workaround is currently used in Fleet's internal dogfood instance: https://github.com/fleetdm/fleet/blob/main/.github/workflows/dogfood-gitops.yml#L40-L45
Changes
Product
Engineering
QA
Risk assessment
Manual testing steps
Testing notes
Confirmation
The text was updated successfully, but these errors were encountered: