Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

cli: Add enforce single mesh functionality to osm install #1854

Merged
merged 2 commits into from
Oct 19, 2020

Conversation

ksubrmnn
Copy link
Contributor

Description:
--enable-single-mesh enforces that only one mesh is installed in the cluster
Fixes #1754

Affected area:

  • New Functionality [ ]
  • Documentation [ ]
  • Install [ ]
  • Control Plane [ ]
  • CLI Tool [X]
  • Certificate Management [ ]
  • Networking [ ]
  • Metrics [ ]
  • SMI Policy [ ]
  • Security [ ]
  • Tests [ ]
  • CI System [ ]
  • Performance [ ]
  • Other [ ]

Please answer the following questions with yes/no.

  • Does this change contain code from or inspired by another project? If so, did you notify the maintainers and provide attribution?

No

@ksubrmnn ksubrmnn added the wip Work-in-Progress label Oct 15, 2020
@ksubrmnn ksubrmnn removed the wip Work-in-Progress label Oct 16, 2020
@ksubrmnn ksubrmnn marked this pull request as ready for review October 16, 2020 00:01
@ksubrmnn ksubrmnn requested a review from a team as a code owner October 16, 2020 00:01
@codecov-io
Copy link

Codecov Report

Merging #1854 into main will increase coverage by 0.05%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1854      +/-   ##
==========================================
+ Coverage   59.09%   59.15%   +0.05%     
==========================================
  Files         125      125              
  Lines        5171     5183      +12     
==========================================
+ Hits         3056     3066      +10     
- Misses       2112     2114       +2     
  Partials        3        3              
Impacted Files Coverage Δ
cmd/cli/install.go 65.30% <83.33%> (+1.60%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 87d9fb9...fb41f86. Read the comment docs.

cmd/cli/install.go Outdated Show resolved Hide resolved
Comment on lines 308 to 310
singleMeshEnforced := mesh.ObjectMeta.Labels["enforceSingleMesh"] == "true"
name := mesh.ObjectMeta.Labels["meshName"]
if singleMeshEnforced {
Copy link
Member

Choose a reason for hiding this comment

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

Since the single mesh feature is a cluster wide configuration, should we introduce semantics for cluster wide configurations, such as a configMap in the default namespace, as opposed to labels on deployments?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Per offline discussions with the team, we will push this out until later when more cluster wide configurations arise.

shashankram
shashankram previously approved these changes Oct 19, 2020
@ksubrmnn ksubrmnn merged commit 8e22bef into openservicemesh:main Oct 19, 2020
@ksubrmnn ksubrmnn deleted the single_mesh branch October 19, 2020 22:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enforce a single OSM controller per cluster via a feature flag
4 participants