Skip to content

OVN: use config file via ConfigMap rather than environment variables#217

Closed
pecameron wants to merge 1 commit intoopenshift:masterfrom
pecameron:sdn456
Closed

OVN: use config file via ConfigMap rather than environment variables#217
pecameron wants to merge 1 commit intoopenshift:masterfrom
pecameron:sdn456

Conversation

@pecameron
Copy link
Contributor

@pecameron pecameron commented Jun 28, 2019

Create a new daemonset version that passes the ovn-config configMap
into the container as a file. Modify master and node daemonsets.

Create a ovnkube config file using a configMap.

This must merge after ovn-kubernetes/ovn-kubernetes#748
which sets up daemonset version 4

SDN-456
https://jira.coreos.com/browse/SDN-456

Signed-off-by: Phil Cameron pcameron@redhat.com

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 28, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: pecameron
To complete the pull request process, please assign dcbw
You can assign the PR to them by writing /assign @dcbw in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 3, 2019
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 16, 2019
@pecameron
Copy link
Contributor Author

@dcbw This has the changes we talked about. PTAL

pecameron added a commit to pecameron/ovn-kubernetes that referenced this pull request Jul 16, 2019
…bles

The ovn-config configMap can be mounted into the container and
values taken from there rather than using the environment variables.

The config-file for ovnkube can be passed by a configMap and mounted
into the container. This limits the need for environment variables.

This change in API results in

OVN_DAEMONSET_VERSION 4
Version 3 is still supported.
Eliminated v1 and v2 support.

The environment variables in V3 are preserved for existing users.

See also:
openshift/cluster-network-operator#217

SDN-456
https://jira.coreos.com/browse/SDN-456

Signed-off-by: Phil Cameron <pcameron@redhat.com>
@pecameron pecameron changed the title [WIP]OVN: use config file via ConfigMap rather than environment varia… [WIP]OVN: use config file via ConfigMap rather than environment variables Jul 17, 2019
pecameron added a commit to pecameron/ovn-kubernetes that referenced this pull request Jul 17, 2019
…bles

The ovn-config configMap can be mounted into the container and
values taken from there rather than using the environment variables.

The config-file for ovnkube can be passed by a configMap and mounted
into the container. This limits the need for environment variables.

This change in API results in

OVN_DAEMONSET_VERSION 4
Version 3 is still supported.
Eliminated v1 and v2 support.

The environment variables in V3 are preserved for existing users.

See also:
openshift/cluster-network-operator#217

SDN-456
https://jira.coreos.com/browse/SDN-456

Signed-off-by: Phil Cameron <pcameron@redhat.com>
@pecameron pecameron force-pushed the sdn456 branch 2 times, most recently from abfafd1 to 7cd3578 Compare July 17, 2019 19:30
pecameron added a commit to pecameron/ovn-kubernetes that referenced this pull request Jul 17, 2019
…bles

The ovn-config configMap can be mounted into the container and
values taken from there rather than using the environment variables.

The config-file for ovnkube can be passed by a configMap and mounted
into the container. This limits the need for environment variables.

This change in API results in

OVN_DAEMONSET_VERSION 4
Version 3 is still supported.
Eliminated v1 and v2 support.

The environment variables in V3 are preserved for existing users.

See also:
openshift/cluster-network-operator#217

SDN-456
https://jira.coreos.com/browse/SDN-456

Signed-off-by: Phil Cameron <pcameron@redhat.com>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, now passed in config file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pecameron for OpenShift this value will always be "openshift-ovn-kubernetes" so I think we can just hardcode it here for the CNO. Upstream of course it needs to be configurable but will default to "ovn-kubernetes".

@pecameron
Copy link
Contributor Author

@dcbw made the config file change. The yaml file change will need a change to ovn-config configmap to pass it namespace in. I'll get to that next.

pecameron added a commit to pecameron/ovn-kubernetes that referenced this pull request Jul 18, 2019
…bles

The ovn-config configMap can be mounted into the container and
values taken from there rather than using the environment variables.

The config-file for ovnkube can be passed by a configMap and mounted
into the container. This limits the need for environment variables.

This change in API results in

OVN_DAEMONSET_VERSION 4
Version 3 is still supported.
Eliminated v1 and v2 support.

The environment variables in V3 are preserved for existing users.

See also:
openshift/cluster-network-operator#217

SDN-456
https://jira.coreos.com/browse/SDN-456

Signed-off-by: Phil Cameron <pcameron@redhat.com>
@pecameron
Copy link
Contributor Author

@dcbw added namespace to the ovn-config configmap and and removed OVN_KUBERNETES_NAMESPACE from the daemonsets. PTAL

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For all the cert variables, let's just remove them from the config for now, since the default is empty anyway. When we figure out what needs to be done for SSL we can add them back.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, we should not be putting secrets in configmaps.

The typical solution is to write them on disk via Secrets, and just configure the path to them via config files.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@squeed client-privkey is a defined part of the config file.
@dcbw @squeed, eliminated [ovnnorth] and [ovnsouth] sections. When ssl is supported they can be added back.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The config file hardcodes the loglevel, so we should be consistent. Either hardcode it in the config and don't bother templating, or template it all the way through and not hardcode it in the config file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dcbw Its now templated.

pecameron added a commit to pecameron/ovn-kubernetes that referenced this pull request Aug 13, 2019
…bles

The ovn-config configMap can be mounted into the container and
values taken from there rather than using the environment variables.

The config-file for ovnkube can be passed by a configMap and mounted
into the container. This limits the need for environment variables.

This change in API results in

OVN_DAEMONSET_VERSION 4
Version 3 is still supported.
Eliminated v1 and v2 support.

The environment variables in V3 are preserved for existing users.

See also:
openshift/cluster-network-operator#217

SDN-456
https://jira.coreos.com/browse/SDN-456

Signed-off-by: Phil Cameron <pcameron@redhat.com>
pecameron added a commit to pecameron/ovn-kubernetes that referenced this pull request Aug 15, 2019
…bles

The ovn-config configMap can be mounted into the container and
values taken from there rather than using the environment variables.

The config-file for ovnkube can be passed by a configMap and mounted
into the container. This limits the need for environment variables.

This change in API results in

OVN_DAEMONSET_VERSION 4
Version 3 is still supported.
Eliminated v1 and v2 support.

The environment variables in V3 are preserved for existing users.

See also:
openshift/cluster-network-operator#217

SDN-456
https://jira.coreos.com/browse/SDN-456

Signed-off-by: Phil Cameron <pcameron@redhat.com>
pecameron added a commit to pecameron/ovn-kubernetes that referenced this pull request Aug 22, 2019
…bles

The ovn-config configMap can be mounted into the container and
values taken from there rather than using the environment variables.

The config-file for ovnkube can be passed by a configMap and mounted
into the container. This limits the need for environment variables.

This change in API results in

OVN_DAEMONSET_VERSION 4
Version 3 is still supported.
Eliminated v1 and v2 support.

The environment variables in V3 are preserved for existing users.

See also:
openshift/cluster-network-operator#217

SDN-456
https://jira.coreos.com/browse/SDN-456

Signed-off-by: Phil Cameron <pcameron@redhat.com>
pecameron added a commit to pecameron/ovn-kubernetes that referenced this pull request Aug 29, 2019
The ovn-config configMap can be mounted into the container and
values taken from there rather than using the environment variables.

The config-file for ovnkube can be passed by a configMap and mounted
into the container. This limits the need for environment variables.

This change in API results in

OVN_DAEMONSET_VERSION 4
Version 3 is still supported.
Eliminated v1 and v2 support.

The environment variables in V3 are preserved for existing users.

See also:
openshift/cluster-network-operator#217

SDN-456
https://jira.coreos.com/browse/SDN-456

Signed-off-by: Phil Cameron <pcameron@redhat.com>
pecameron added a commit to pecameron/ovn-kubernetes that referenced this pull request Aug 29, 2019
The ovn-config configMap can be mounted into the container and
values taken from there rather than using the environment variables.

The config-file for ovnkube can be passed by a configMap and mounted
into the container. This limits the need for environment variables.

This change in API results in

OVN_DAEMONSET_VERSION 4
Version 3 is still supported.
Eliminated v1 and v2 support.

The environment variables in V3 are preserved for existing users.

See also:
openshift/cluster-network-operator#217

SDN-456
https://jira.coreos.com/browse/SDN-456

Signed-off-by: Phil Cameron <pcameron@redhat.com>
pecameron added a commit to pecameron/ovn-kubernetes that referenced this pull request Aug 29, 2019
The ovn-config configMap can be mounted into the container and
values taken from there rather than using the environment variables.

The config-file for ovnkube can be passed by a configMap and mounted
into the container. This limits the need for environment variables.

This change in API results in

OVN_DAEMONSET_VERSION 4
Version 3 is still supported.
Eliminated v1 and v2 support.

The environment variables in V3 are preserved for existing users.

See also:
openshift/cluster-network-operator#217

SDN-456
https://jira.coreos.com/browse/SDN-456

Signed-off-by: Phil Cameron <pcameron@redhat.com>
@pecameron pecameron changed the title [WIP]OVN: use config file via ConfigMap rather than environment variables OVN: use config file via ConfigMap rather than environment variables Aug 29, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 29, 2019
@pecameron
Copy link
Contributor Author

@dcbw @squeed This is now working. PTAL

pecameron added a commit to pecameron/ovn-kubernetes that referenced this pull request Aug 30, 2019
The ovn-config configMap can be mounted into the container and
values taken from there rather than using the environment variables.

The config-file for ovnkube can be passed by a configMap and mounted
into the container. This limits the need for environment variables.

This change in API results in

OVN_DAEMONSET_VERSION 4
Version 3 is still supported.
Eliminated v1 and v2 support.

The environment variables in V3 are preserved for existing users.

See also:
openshift/cluster-network-operator#217

SDN-456
https://jira.coreos.com/browse/SDN-456

Signed-off-by: Phil Cameron <pcameron@redhat.com>
@danwinship
Copy link
Contributor

/hold
depends on ovn-kubernetes/ovn-kubernetes#748 being merged and then openshift/ovn-kubernetes being rebased

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 30, 2019
pecameron added a commit to pecameron/ovn-kubernetes that referenced this pull request Sep 9, 2019
The ovn-config configMap can be mounted into the container and
values taken from there rather than using the environment variables.

The config-file for ovnkube can be passed by a configMap and mounted
into the container. This limits the need for environment variables.

This change in API results in

OVN_DAEMONSET_VERSION 4
Version 3 is still supported.
Eliminated v1 and v2 support.

The environment variables in V3 are preserved for existing users.

See also:
openshift/cluster-network-operator#217

SDN-456
https://jira.coreos.com/browse/SDN-456

Signed-off-by: Phil Cameron <pcameron@redhat.com>
pecameron added a commit to pecameron/ovn-kubernetes that referenced this pull request Sep 11, 2019
The ovn-config configMap can be mounted into the container and
values taken from there rather than using the environment variables.

The config-file for ovnkube can be passed by a configMap and mounted
into the container. This limits the need for environment variables.

This change in API results in

OVN_DAEMONSET_VERSION 4
Version 3 is still supported.
Eliminated v1 and v2 support.

The environment variables in V3 are preserved for existing users.

See also:
openshift/cluster-network-operator#217

SDN-456
https://jira.coreos.com/browse/SDN-456

Signed-off-by: Phil Cameron <pcameron@redhat.com>
pecameron added a commit to pecameron/ovn-kubernetes that referenced this pull request Sep 11, 2019
The ovn-config configMap can be mounted into the container and
values taken from there rather than using the environment variables.

The config-file for ovnkube can be passed by a configMap and mounted
into the container. This limits the need for environment variables.

This change in API results in

OVN_DAEMONSET_VERSION 4
Version 3 is still supported.
Eliminated v1 and v2 support.

The environment variables in V3 are preserved for existing users.

See also:
openshift/cluster-network-operator#217

SDN-456
https://jira.coreos.com/browse/SDN-456

Signed-off-by: Phil Cameron <pcameron@redhat.com>
pecameron added a commit to pecameron/ovn-kubernetes that referenced this pull request Sep 16, 2019
The ovn-config configMap can be mounted into the container and
values taken from there rather than using the environment variables.

The config-file for ovnkube can be passed by a configMap and mounted
into the container. This limits the need for environment variables.

This change in API results in

OVN_DAEMONSET_VERSION 4
Version 3 is still supported.
Eliminated v1 and v2 support.

The environment variables in V3 are preserved for existing users.

See also:
openshift/cluster-network-operator#217

SDN-456
https://jira.coreos.com/browse/SDN-456

Signed-off-by: Phil Cameron <pcameron@redhat.com>
@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 24, 2019
@openshift-ci-robot
Copy link
Contributor

@pecameron: PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

pecameron added a commit to pecameron/ovn-kubernetes that referenced this pull request Sep 24, 2019
The ovn-config configMap can be mounted into the container and
values taken from there rather than using the environment variables.

The config-file for ovnkube can be passed by a configMap and mounted
into the container. This limits the need for environment variables.

This change in API results in

OVN_DAEMONSET_VERSION 4
Version 3 is still supported.
Eliminated v1 and v2 support.

The environment variables in V3 are preserved for existing users.

See also:
openshift/cluster-network-operator#217

SDN-456
https://jira.coreos.com/browse/SDN-456

Signed-off-by: Phil Cameron <pcameron@redhat.com>
Create a new daemonset version that passes the ovn-config configMap
into the container as a file. Create the ovnkube-config configMap to
create the ovnkube config-file.

Modify master and node daemonsets.

OVN_DAEMONSET_VERSION 4

This must merge after ovn-kubernetes/ovn-kubernetes#748
which sets up daemonset version 4

SDN-456
https://jira.coreos.com/browse/SDN-456

Signed-off-by: Phil Cameron <pcameron@redhat.com>
@openshift-ci-robot
Copy link
Contributor

@pecameron: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/prow/unit 64ebbe0 link /test unit
ci/prow/verify 64ebbe0 link /test verify
ci/prow/e2e-aws 64ebbe0 link /test e2e-aws
ci/prow/images 64ebbe0 link /test images
ci/prow/e2e-aws-upgrade 64ebbe0 link /test e2e-aws-upgrade

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

pecameron added a commit to pecameron/ovn-kubernetes that referenced this pull request Sep 27, 2019
The ovn-config configMap can be mounted into the container and
values taken from there rather than using the environment variables.

The config-file for ovnkube can be passed by a configMap and mounted
into the container. This limits the need for environment variables.

This change in API results in

OVN_DAEMONSET_VERSION 4
Version 3 is still supported.
Eliminated v1 and v2 support.

The environment variables in V3 are preserved for existing users.

See also:
openshift/cluster-network-operator#217

SDN-456
https://jira.coreos.com/browse/SDN-456

Signed-off-by: Phil Cameron <pcameron@redhat.com>
@pecameron
Copy link
Contributor Author

@squeed @dcbw replaced this with #333
Refactored after PR 329 merged.

@pecameron pecameron closed this Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Comments