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

keepalived add job config for global_defs #543

Open
akop opened this issue Oct 19, 2023 · 2 comments
Open

keepalived add job config for global_defs #543

akop opened this issue Oct 19, 2023 · 2 comments
Assignees
Labels

Comments

@akop
Copy link

akop commented Oct 19, 2023

We had the requirement to tweak keepalived global_defs but there is no option to change it with the job config.
Would be great to have such an option.

For now we've created an ops file as quick fix.

Perhaps this is helping someone:

- type: replace
  path: /instance_groups/name=haproxy/jobs/-
  value:
    name: pre-start-script
    properties:
      script: |-
                #!/bin/bash
                KEEPALIVED_CONF_TEMPLATE='/var/vcap/jobs/keepalived/config/keepalived.config.template'
                SEARCH_STRING='lvs_id haproxy'
                REPLACE_STRING='lvs_id haproxy
                        max_auto_priority -1
                        vrrp_garp_master_repeat 5
                        vrrp_garp_interval 1
                        vrrp_garp_lower_prio_repeat 1
                        vrrp_garp_master_refresh 300
                        vrrp_garp_master_refresh_repeat 1
                        vrrp_higher_prio_send_advert true'
                
                cp $KEEPALIVED_CONF_TEMPLATE $KEEPALIVED_CONF_TEMPLATE.pre-pre-start-script
                sed -i "s|${SEARCH_STRING}|${REPLACE_STRING//$'\n'/\\n}|" $KEEPALIVED_CONF_TEMPLATE
    release: os-conf

- type: replace
  path: /releases/name=os-conf?
  value:
    name: os-conf
    version: latest # take just the one which is defined in runtime-config
@maxmoehl
Copy link
Member

We are open for contributions! If you'd like to expose new properties via the job config feel free to submit a PR and we can discuss the details. If you prefer, you can first outline your proposed changes in this issue to discuss them beforehand.

@maxmoehl maxmoehl moved this from Inbox to Waiting for Changes | Open for Contribution in Application Runtime Platform Working Group Dec 12, 2023
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within 15 days.

@github-actions github-actions bot added the stale label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Waiting for Changes | Open for Contribution
Development

No branches or pull requests

2 participants