-
Notifications
You must be signed in to change notification settings - Fork 106
feat: Platform Engineer can configure CF feature flags via bosh deplo… #567
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…yment - Added a new property to override default feature flags.
5 tasks
Member
AcceptanceConfiguring true/false/null❯ cf feature-flags
Getting feature flags as admin...
name state
app_bits_upload enabled
app_scaling enabled
diego_cnb disabled
diego_docker disabled
env_var_visibility enabled
...❯ bosh deploy /tmp/bertram.yml --no-redact
Using environment '35.227.151.30' as client 'admin'
...
instance_groups:
- name: api
jobs:
- name: cloud_controller_ng
properties:
cc:
+ feature_flag_overrides:
+ app_bits_upload: false
+ diego_cnb: true
+ env_var_visibility:
...
Task 99 | 19:27:27 | L executing pre-start: api/a9690e0e-d9c9-418f-946a-fb4d2930797b (0) (canary) (00:01:11)
L Error: Action Failed get_task: Task 1e671243-f5fe-42ee-47c9-c719fde8e799 result: 1 of 6 pre-start scripts failed. Failed Jobs: cloud_controller_ng. Successful Jobs: loggregator_agent, bpm, bosh-dns, policy-server, cc_uploader.❯ bosh ssh api
...
api/a9690e0e-d9c9-418f-946a-fb4d2930797b:~$ sudo su -
...api/a9690e0e-d9c9-418f-946a-fb4d2930797b:~# tail -n 50 /var/vcap/sys/log/cloud_controller_ng/pre-start.stderr.log
...
[2025-08-26 19:27:39+0000] + chpst -u vcap:vcap /var/vcap/jobs/cloud_controller_ng/bin/seed_db
[2025-08-26 19:27:44+0000] rake aborted!
[2025-08-26 19:27:44+0000] Invalid feature flag value(s): {:app_bits_upload=>false, :diego_cnb=>true, :env_var_visibility=>nil}
[2025-08-26 19:27:44+0000] /var/vcap/data/packages/cloud_controller_ng/2c5e3b9f6475aa68c557f0d6acf345e39345b5fb/cloud_controller_ng/app/models/runtime/feature_flag.rb:91:in `override_default_flags'
[2025-08-26 19:27:44+0000] /var/vcap/data/packages/cloud_controller_ng/2c5e3b9f6475aa68c557f0d6acf345e39345b5fb/cloud_controller_ng/config/initializers/feature_flag_overrides.rb:7:in `feature_flag_overrides'
[2025-08-26 19:27:44+0000] /var/vcap/data/packages/cloud_controller_ng/2c5e3b9f6475aa68c557f0d6acf345e39345b5fb/cloud_controller_ng/lib/cloud_controller/config.rb:182:in `block in run_initializers_in_directory'
...This error is fine. I was curious to see if ❯ bosh cancel-task 99Configuring true/false❯ bosh deploy /tmp/bertram.yml --no-redact
Using environment '35.227.151.30' as client 'admin'
...
instance_groups:
- name: api
jobs:
- name: cloud_controller_ng
properties:
cc:
+ feature_flag_overrides:
+ app_bits_upload: false
+ diego_cnb: true
...
Task 101 done
Succeeded❯ cf feature-flags
Getting feature flags as admin...
name state
app_bits_upload disabled
app_scaling enabled
diego_cnb enabled
diego_docker disabled
...Updating at Runtime❯ cf enable-feature-flag app_bits_upload
Enabling feature flag app_bits_upload as admin...
OK❯ cf feature-flags
Getting feature flags as admin...
name state
app_bits_upload enabled
app_scaling enabled
...❯ bosh restart api
Using environment '35.227.151.30' as client 'admin'
Using deployment 'cf'
...
Task 102 Duration 00:02:17
Task 102 done
Succeeded❯ cf feature-flags
Getting feature flags as admin...
name state
app_bits_upload disabled
app_scaling enabled
diego_cnb enabled
diego_docker disabledBosh link propagation❯ bosh ssh api -c 'cat /var/vcap/jobs/cloud_controller_ng/config/cloud_controller_ng.yml | grep "feature_flag_overrides"' | grep stdout
api/a9690e0e-d9c9-418f-946a-fb4d2930797b: stdout | feature_flag_overrides: {"app_bits_upload":false,"diego_cnb":true}❯ bosh ssh cc-worker -c 'cat /var/vcap/jobs/cloud_controller_worker/config/cloud_controller_ng.yml | grep "feature_flag_overrides"' | grep stdout
cc-worker/a1bd2033-0ccb-47a0-9eca-b6067d8b0396: stdout | feature_flag_overrides: {"app_bits_upload":false,"diego_cnb":true}❯ bosh ssh scheduler -c 'cat /var/vcap/jobs/cloud_controller_clock/config/cloud_controller_ng.yml | grep "feature_flag_overrides"' | grep stdout
scheduler/e5737baa-bf7f-4f0d-919c-e83fed7f420c: stdout | feature_flag_overrides: {"app_bits_upload":false,"diego_cnb":true}❯ bosh ssh scheduler -c 'cat /var/vcap/jobs/cc_deployment_updater/config/cloud_controller_ng.yml | grep "feature_flag_overrides"' | grep stdout
scheduler/e5737baa-bf7f-4f0d-919c-e83fed7f420c: stdout | feature_flag_overrides: {"app_bits_upload":false,"diego_cnb":true}Invalid types/values❯ bosh deploy /tmp/bertram.yml --no-redact
...
instance_groups:
- name: api
jobs:
- name: cloud_controller_ng
properties:
cc:
feature_flag_overrides:
- app_bits_upload: false
+ app_bits_upload:
+ - true
- diego_cnb: true
+ diego_cnb: sure
+ diego_docker: 5
...
Task 127 | 20:03:20 | L executing pre-start: api/a9690e0e-d9c9-418f-946a-fb4d2930797b (0) (canary) (00:01:13)
L Error: Action Failed get_task: Task c77337ea-8abc-4856-40b1-8f05afc0c440 result: 1 of 6 pre-start scripts failed. Failed Jobs: cloud_controller_ng. Successful Jobs: loggregator_agent, bpm, bosh-dns, policy-server, cc_uploader.api/a9690e0e-d9c9-418f-946a-fb4d2930797b:~# tail -n 50 /var/vcap/sys/log/cloud_controller_ng/pre-start.stderr.log
...
[2025-08-26 20:03:39+0000] Invalid feature flag value(s): {:app_bits_upload=>[true], :diego_cnb=>"sure", :diego_docker=>5}
...Invalid keys❯ bosh deploy /tmp/bertram.yml --no-redact
Using environment '35.227.151.30' as client 'admin'
...
instance_groups:
- name: api
jobs:
- name: cloud_controller_ng
properties:
cc:
+ feature_flag_overrides:
+ diego_docker: true
+ foo: true
...
Task 142 | 21:31:34 | Updating instance api: api/a9690e0e-d9c9-418f-946a-fb4d2930797b (0) (canary) (00:00:32)
L Error: Action Failed get_task: Task 2788783f-82d8-4b7d-73e6-88da30e718cb result: 1 of 6 pre-start scripts failed. Failed Jobs: cloud_controller_ng. Successful Jobs: loggregator_agent, policy-server, bpm, cc_uploader, bosh-dns.api/a9690e0e-d9c9-418f-946a-fb4d2930797b:~# tail -n 50 /var/vcap/sys/log/cloud_controller_ng/pre-start.stderr.log
...
[2025-08-26 21:31:33+0000] /var/vcap/data/packages/cloud_controller_ng/2c5e3b9f6475aa68c557f0d6acf345e39345b5fb/cloud_controller_ng/app/models/runtime/feature_flag.rb:90:in `override_default_flags'
...Empty❯ bosh deploy /tmp/bertram.yml --no-redact
...
instance_groups:
- name: api
jobs:
- name: cloud_controller_ng
properties:
cc:
- feature_flag_overrides:
- app_bits_upload: false
- diego_cnb: true
Task 129 done
Succeeded❯ bosh ssh api -c 'cat /var/vcap/jobs/cloud_controller_ng/config/cloud_controller_ng.yml | grep "feature_flag_overrides"' | grep stdout
api/a9690e0e-d9c9-418f-946a-fb4d2930797b: stdout | feature_flag_overrides: {}❯ bosh ssh cc-worker -c 'cat /var/vcap/jobs/cloud_controller_worker/config/cloud_controller_ng.yml | grep "feature_flag_overrides"'
Using environment '35.227.151.30' as client 'admin'
Using deployment 'cf'
Task 138. Done
cc-worker/a1bd2033-0ccb-47a0-9eca-b6067d8b0396: stderr | Unauthorized use is strictly prohibited. All access and activity
cc-worker/a1bd2033-0ccb-47a0-9eca-b6067d8b0396: stderr | is subject to logging and monitoring.
cc-worker/a1bd2033-0ccb-47a0-9eca-b6067d8b0396: stderr | Connection to 10.244.0.134 closed.
Running SSH:
1 error occurred:
* Running command: 'ssh -tt -o ServerAliveInterval=30 -o ForwardAgent=no -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/gcobb/.bosh/tmp/ssh-priv-key178416288 -o UserKnownHostsFile=/Users/gcobb/.bosh/tmp/ssh-known-hosts1002099077 -o ProxyCommand=nc -x 127.0.0.1:55550 %!h(MISSING) %!p(MISSING) -o StrictHostKeyChecking=yes 10.244.0.134 -l bosh_6da0736ae08740d cat /var/vcap/jobs/cloud_controller_worker/config/cloud_controller_ng.yml | grep "feature_flag_overrides"', stdout: '', stderr: '': exit status 1
Exit code 1 |
Gerg
approved these changes
Aug 26, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…yment
Thanks for contributing to the
capi_release. To speed up the process of reviewing your pull request please provide us with:A short explanation of the proposed change:
The objective: Platform engineer can override feature flags in the capi release bosh deployment manifest.
An explanation of the use cases your change solves
See the above.
Links to any other associated PRs
feat: Platform Engineer can configure CF feature flags via bosh deplo… cloud_controller_ng#4523
I have viewed signed and have submitted the Contributor License Agreement
I have made this pull request to the
developbranchI have run CF Acceptance Tests on bosh lite