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

ansible/helm : align flags and deprecate the old ones #4654

Merged
merged 1 commit into from
Mar 18, 2021

Conversation

camilamacedo86
Copy link
Contributor

@camilamacedo86 camilamacedo86 commented Mar 13, 2021

Description of the change:

  • Deprecated the flags which were removed in the Golang project in order to keep it better aligned with K8S
  • Add the new flags
  • Ensure that that metrics port is passed to the proxy.

Motivation for the change:

Checklist

If the pull request includes user-facing changes, extra documentation is required:

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 13, 2021
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 12:44 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 12:44 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 12:44 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 12:44 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 12:44 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 12:44 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 13:58 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 13:58 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 13:58 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 13:58 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 13:58 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 13:58 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 14:11 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 14:11 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 14:11 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 14:11 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 14:11 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 14:11 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 14:13 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 14:13 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 14:13 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 14:13 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 14:13 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 13, 2021 14:13 Inactive
# endpoint w/o any authn/z, please comment the following line.
# Protect the /metrics endpoint by putting it behind auth.
# If you want your controller-manager to expose the /metrics
# endpoint w/o any authn/z, please comment the following line.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

these changes are because of the alignment to keep the file such as upstream.

&prometheus.Kustomization{},
&prometheus.ServiceMonitor{},
&kdefault.AuthProxyPatch{},
&kdefault.ManagerAuthProxyPatch{},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

these changes are because of the alignment to keep the file such as upstream.
just replace the names

type Kustomization struct {
file.TemplateMixin
}

// SetTemplateDefaults implements input.Template
// SetTemplateDefaults implements file.Template
func (f *Kustomization) SetTemplateDefaults() error {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

these changes are because of the alignment to keep the file such as upstream.

// Manager scaffolds yaml config for the manager.
type Manager struct {
// Config scaffolds a file that defines the namespace and the manager deployment
type Config struct {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

these changes are because of the alignment to keep the file such as upstream.

@camilamacedo86
Copy link
Contributor Author

Hi @estroz,

Really thank you. All suggestion (less this nit #4654 (comment)) are addressed, PLease, feel free to check.

@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 18, 2021 16:40 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 18, 2021 16:40 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 18, 2021 16:40 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 18, 2021 16:40 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 18, 2021 16:40 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 18, 2021 16:40 Inactive
Copy link
Member

@estroz estroz left a comment

Choose a reason for hiding this comment

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

Changelog nits, otherwise LGTM.

# release notes and/or the migration guide
entries:
- description: >
(ansible/v1)(helm/v1) In order to align the Ansible/Helm based-projects with the Kubernetes nomenclatures the flags `--enable-leader-election` and `--metrics-addr` were deprecated and replaced by `--leader-elect` and `--metrics-bind-address` respectively.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
(ansible/v1)(helm/v1) In order to align the Ansible/Helm based-projects with the Kubernetes nomenclatures the flags `--enable-leader-election` and `--metrics-addr` were deprecated and replaced by `--leader-elect` and `--metrics-bind-address` respectively.
(ansible/v1, helm/v1) The flags `--enable-leader-election` and `--metrics-addr` were deprecated in favor of `--leader-elect` and `--metrics-bind-address`, respectively, to follow upstream conventions.

# Migration can be defined to automatically add a section to
# the migration guide. This is required for breaking changes.
migration:
header: (ansible/v1)(helm/v1) Replace the deprecated flags
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
header: (ansible/v1)(helm/v1) Replace the deprecated flags
header: (ansible/v1, helm/v1) Replace deprecated leader election and metrics address flags

migration:
header: (ansible/v1)(helm/v1) Replace the deprecated flags
body: >
Replace the flags `--enable-leader-election` and `--metrics-addr` which were deprecated with `--leader-elect` and `--metrics-bind-address` respectively.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Replace the flags `--enable-leader-election` and `--metrics-addr` which were deprecated with `--leader-elect` and `--metrics-bind-address` respectively.
Replace deprecated flags `--enable-leader-election` and `--metrics-addr` with `--leader-elect` and `--metrics-bind-address`, respectively.

body: >
Replace the flags `--enable-leader-election` and `--metrics-addr` which were deprecated with `--leader-elect` and `--metrics-bind-address` respectively.
- description: >
(ansible/v1)(helm/v1) Ensure that the `--health-probe-bind-address` port will be informed to the proxy.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
(ansible/v1)(helm/v1) Ensure that the `--health-probe-bind-address` port will be informed to the proxy.
(ansible/v1, helm/v1) Explicitly set `--health-probe-bind-address` in the manager's auth proxy patch.

# - deprecation
# - removal
# - bugfix
kind: "bugfix"
Copy link
Member

Choose a reason for hiding this comment

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

This is more of a non-breaking change, since nothing is currently broken.

Suggested change
kind: "bugfix"
kind: "change"

# Migration can be defined to automatically add a section to
# the migration guide. This is required for breaking changes.
migration:
header: (ansible/v1)(helm/v1) Ensure that the `--health-probe-bind-address` port will be informed to the proxy.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
header: (ansible/v1)(helm/v1) Ensure that the `--health-probe-bind-address` port will be informed to the proxy.
header: (ansible/v1, helm/v1) Explicitly set `--health-probe-bind-address` in the manager's auth proxy patch.

changelog/fragments/ansible-helm-flags.yaml Show resolved Hide resolved
Signed-off-by: Camila Macedo <cmacedo@redhat.com>
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 18, 2021 21:04 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 18, 2021 21:04 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 18, 2021 21:04 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 18, 2021 21:04 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 18, 2021 21:04 Inactive
@camilamacedo86 camilamacedo86 temporarily deployed to deploy March 18, 2021 21:04 Inactive
@camilamacedo86
Copy link
Contributor Author

@estroz All done tks.

Copy link
Member

@estroz estroz left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 18, 2021
@camilamacedo86 camilamacedo86 merged commit 348e7de into operator-framework:master Mar 18, 2021
@camilamacedo86 camilamacedo86 deleted the flags branch March 18, 2021 22:58
waynesun09 added a commit to waynesun09/reportportal-operator that referenced this pull request Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants