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

salt: Use csc framework for UI configuration #3181

Merged

Conversation

JBWatenbergScality
Copy link
Contributor

@JBWatenbergScality JBWatenbergScality commented Mar 9, 2021

Component:

'salt'

Context:

UI configuration can be patched in order to match a specific environment constraints.
Before this PR any upgrade of metalk8s would revert those patches.

Summary:

Introducing CSC framework for ui configuration management allows deploying upgrade using a configmap merge approach in order to avoid losing config patches.

Work in progress:

- [x] Add JSON support to CSC framework

Acceptance criteria:

After an upgrade on a platform where UI configmap were patched, updated configmaps should preserved the overrides in place before the upgrade.

Closes: #3175

@JBWatenbergScality JBWatenbergScality added the topic:salt Everything related to SaltStack in our product label Mar 9, 2021
@JBWatenbergScality JBWatenbergScality force-pushed the improvement/shell-ui-make-navbar-options-configurable branch from 904782f to d870add Compare March 9, 2021 18:13
@JBWatenbergScality JBWatenbergScality force-pushed the improvement/use-csc-framework-for-ui-configuration branch 7 times, most recently from 5bbb026 to e6ab115 Compare March 11, 2021 15:18
@JBWatenbergScality JBWatenbergScality marked this pull request as ready for review March 11, 2021 15:19
@JBWatenbergScality JBWatenbergScality requested a review from a team as a code owner March 11, 2021 15:19
@JBWatenbergScality JBWatenbergScality force-pushed the improvement/use-csc-framework-for-ui-configuration branch from e6ab115 to 480e0d9 Compare March 12, 2021 09:13
@JBWatenbergScality
Copy link
Contributor Author

@bert-e after_pull_request=3154

@JBWatenbergScality JBWatenbergScality force-pushed the improvement/use-csc-framework-for-ui-configuration branch from 480e0d9 to df63277 Compare March 12, 2021 09:36
@JBWatenbergScality JBWatenbergScality force-pushed the improvement/shell-ui-make-navbar-options-configurable branch 2 times, most recently from 06a5496 to 06e1b08 Compare March 15, 2021 11:31
@JBWatenbergScality JBWatenbergScality force-pushed the improvement/use-csc-framework-for-ui-configuration branch from df63277 to 04a7330 Compare March 15, 2021 11:35
Base automatically changed from improvement/shell-ui-make-navbar-options-configurable to development/2.9 March 15, 2021 18:27
@bert-e
Copy link
Contributor

bert-e commented Mar 15, 2021

Hello jbwatenbergscality,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Status report is not available.

@bert-e
Copy link
Contributor

bert-e commented Mar 15, 2021

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

The following options are set: after_pull_request

@JBWatenbergScality JBWatenbergScality force-pushed the improvement/use-csc-framework-for-ui-configuration branch 3 times, most recently from a269acb to 824a204 Compare March 17, 2021 11:38
Copy link
Contributor

@gdemonet gdemonet left a comment

Choose a reason for hiding this comment

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

Mostly docs changes, and renaming for apiVersion and kind.

docs/developer/architecture/configurations.rst Outdated Show resolved Hide resolved
docs/developer/architecture/configurations.rst Outdated Show resolved Hide resolved
docs/operation/cluster_and_service_configuration.rst Outdated Show resolved Hide resolved
docs/operation/cluster_and_service_configuration.rst Outdated Show resolved Hide resolved
docs/operation/cluster_and_service_configuration.rst Outdated Show resolved Hide resolved
docs/operation/cluster_and_service_configuration.rst Outdated Show resolved Hide resolved
salt/_modules/metalk8s_service_configuration.py Outdated Show resolved Hide resolved
salt/metalk8s/addons/ui/config/metalk8s-ui-config.yaml Outdated Show resolved Hide resolved
salt/metalk8s/addons/ui/config/metalk8s-theme.yaml.in Outdated Show resolved Hide resolved
@bert-e
Copy link
Contributor

bert-e commented Mar 17, 2021

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

The following reviewers are expecting changes from the author, or must review again:

The following options are set: after_pull_request

@JBWatenbergScality JBWatenbergScality force-pushed the improvement/use-csc-framework-for-ui-configuration branch 2 times, most recently from 5181a5b to c7d42f6 Compare March 17, 2021 16:02
@JBWatenbergScality JBWatenbergScality force-pushed the improvement/use-csc-framework-for-ui-configuration branch 8 times, most recently from 6d621ec to f55efb7 Compare March 18, 2021 19:23
Copy link
Contributor

@gdemonet gdemonet left a comment

Choose a reason for hiding this comment

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

Some apiVersion/kind updates were not propagated

#!yaml

# Defaults for configuration of MetalK8s UI
apiVersion: addons.metalk8s.scality.com
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
apiVersion: addons.metalk8s.scality.com
apiVersion: addons.metalk8s.scality.com/v1alpha1

#!jinja|yaml

# Defaults for shell UI configuration
apiVersion: addons.metalk8s.scality.com
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
apiVersion: addons.metalk8s.scality.com
apiVersion: addons.metalk8s.scality.com/v1alpha1

namespace: metalk8s-ui
data:
config.yaml: |-
apiVersion: addons.metalk8s.scality.com
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
apiVersion: addons.metalk8s.scality.com
apiVersion: addons.metalk8s.scality.com/v1alpha1

data:
config.yaml: |-
apiVersion: addons.metalk8s.scality.com
kind: Metalk8sUIConfig
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
kind: Metalk8sUIConfig
kind: UIConfig

namespace: metalk8s-ui
data:
config.yaml: |-
apiVersion: addons.metalk8s.scality.com
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
apiVersion: addons.metalk8s.scality.com
apiVersion: addons.metalk8s.scality.com/v1alpha1

kind: ConfigMap
data:
config.yaml: |-
apiVersion: addons.metalk8s.scality.com
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
apiVersion: addons.metalk8s.scality.com
apiVersion: addons.metalk8s.scality.com/v1alpha1

data:
config.yaml: |-
apiVersion: addons.metalk8s.scality.com
kind: Metalk8sShellUIConfig
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
kind: Metalk8sShellUIConfig
kind: ShellUIConfig

kind: ConfigMap
data:
config.yaml: |-
apiVersion: addons.metalk8s.scality.com
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
apiVersion: addons.metalk8s.scality.com
apiVersion: addons.metalk8s.scality.com/v1alpha1

data:
config.yaml: |-
apiVersion: addons.metalk8s.scality.com
kind: Metalk8sUIConfig
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
kind: Metalk8sUIConfig
kind: UIConfig

kind: ConfigMap
data:
config.yaml: |-
apiVersion: addons.metalk8s.scality.com
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
apiVersion: addons.metalk8s.scality.com
apiVersion: addons.metalk8s.scality.com/v1alpha1

@JBWatenbergScality JBWatenbergScality force-pushed the improvement/use-csc-framework-for-ui-configuration branch from 9ec3291 to dc7625a Compare March 19, 2021 17:37
Copy link
Contributor

@gdemonet gdemonet left a comment

Choose a reason for hiding this comment

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

Feel free to ignore if you have a green build, but if you don't and need to rebuild, please fix those headers :)

Comment on lines +613 to +614
Changing the MetalK8s UI Ingress Path
""""""""""""""""""""""""""""""""""""""""""""""""
Copy link
Contributor

Choose a reason for hiding this comment

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

It's not "critical" but still a bit ugly 😜

Suggested change
Changing the MetalK8s UI Ingress Path
""""""""""""""""""""""""""""""""""""""""""""""""
Changing the MetalK8s UI Ingress Path
"""""""""""""""""""""""""""""""""""""

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I took care of it in #3196

Comment on lines +647 to +648
MetalK8s UI Theme Customization
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
MetalK8s UI Theme Customization
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MetalK8s UI Theme Customization
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Once the theme is edited, apply your changes by running:


Copy link
Contributor

Choose a reason for hiding this comment

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

Extra empty line, to remove

@bert-e
Copy link
Contributor

bert-e commented Mar 22, 2021

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

The following options are set: after_pull_request

@JBWatenbergScality
Copy link
Contributor Author

/approve

@bert-e
Copy link
Contributor

bert-e commented Mar 22, 2021

In the queue

The changeset has received all authorizations and has been added to the
relevant queue(s). The queue(s) will be merged in the target development
branch(es) as soon as builds have passed.

The changeset will be merged in:

  • ✔️ development/2.9

The following branches will NOT be impacted:

  • development/1.0
  • development/1.1
  • development/1.2
  • development/1.3
  • development/2.0
  • development/2.1
  • development/2.2
  • development/2.3
  • development/2.4
  • development/2.5
  • development/2.6
  • development/2.7
  • development/2.8

There is no action required on your side. You will be notified here once
the changeset has been merged. In the unlikely event that the changeset
fails permanently on the queue, a member of the admin team will
contact you to help resolve the matter.

IMPORTANT

Please do not attempt to modify this pull request.

  • Any commit you add on the source branch will trigger a new cycle after the
    current queue is merged.
  • Any commit you add on one of the integration branches will be lost.

If you need this pull request to be removed from the queue, please contact a
member of the admin team now.

The following options are set: approve, after_pull_request

@bert-e
Copy link
Contributor

bert-e commented Mar 22, 2021

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/2.9

The following branches have NOT changed:

  • development/1.0
  • development/1.1
  • development/1.2
  • development/1.3
  • development/2.0
  • development/2.1
  • development/2.2
  • development/2.3
  • development/2.4
  • development/2.5
  • development/2.6
  • development/2.7
  • development/2.8

Please check the status of the associated issue None.

Goodbye jbwatenbergscality.

@bert-e bert-e merged commit d7a2c95 into development/2.9 Mar 22, 2021
@bert-e bert-e deleted the improvement/use-csc-framework-for-ui-configuration branch March 22, 2021 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic:salt Everything related to SaltStack in our product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use CSC framework to configure Metalk8s UIs
3 participants