-
Notifications
You must be signed in to change notification settings - Fork 0
Add Kubefleet ClusterResourcePlacement template support and fix addon system #2
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
Conversation
Co-authored-by: sjwaight <[email protected]>
…stem Co-authored-by: sjwaight <[email protected]>
Co-authored-by: sjwaight <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot instead of two variables CLUSTER_NAME_1 and CLUSTER_NAME_2 I'd prefer one variable where I can provide a list of cluster names that are then rendered as a YAML list in the output PickFixed manifest. Can you also provide a sample YAML in the documentation for PickFixed showing three clusters.
…ariable - Replaced two separate cluster name variables with a single comma-separated list variable - Added custom template functions (split and trim) to parse comma-separated values - Updated template logic to handle dynamic list of cluster names - Updated documentation with three-cluster example as requested - All tests updated and passing Co-authored-by: sjwaight <[email protected]>
I've updated the implementation to use a single |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to use a new verb 'distribute' instead of re-using the 'update' verb.
Co-authored-by: sjwaight <[email protected]>
I've implemented a new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create an example for clusterresourceplacement go and test file in the example folder.
Co-authored-by: sjwaight <[email protected]>
I've created the example files for ClusterResourcePlacement in the example folder:
The example demonstrates the PickFixed placement type with three clusters using the CLUSTER_NAMES variable. Both files follow the existing example patterns and all tests pass. Changes are in commit dd5d2e4. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the main readme.md file to include the new distribute command. Update the linked contoso-air application to use this URL: https://github.com/Azure-Samples/contoso-air
Co-authored-by: sjwaight <[email protected]>
I've updated the main README.md file to include the new |
This PR implements comprehensive support for Kubefleet's ClusterResourcePlacement manifests in Draft, enabling users to generate both PickAll and PickFixed placement type manifests as requested in the issue.
New Features
Kubefleet ClusterResourcePlacement Template
Added
kubefleet-clusterresourceplacement
addon template that supports:metadata.name
configuration viaCRP_NAME
variablespec.resourceSelectors.name
configuration viaRESOURCE_SELECTOR_NAME
variablepolicy.placementType
configuration viaPLACEMENT_TYPE
variable (PickAll/PickFixed)policy.clusterNames
configuration viaCLUSTER_NAME_1
andCLUSTER_NAME_2
variables for PickFixed typeUsage Examples
PickAll placement type:
Generates the exact YAML from the first sample in the issue:
PickFixed placement type:
Generates the exact YAML from the second sample in the issue with cluster names array.
Bug Fixes
Fixed
draft update --addon
Parameter--addon
parameter was previously ignored, always defaulting toapp-routing-ingress
--addon
is specified, still defaults toapp-routing-ingress
for existing workflowsFixed ActiveWhen Constraint Handling
activeWhen
constraints before checking for disabled promptsactiveWhen
constraints are now properly skippedTesting
app-routing-ingress
addonDocumentation
Added comprehensive documentation at
docs/kubefleet-clusterresourceplacement.md
with:Fixes #1.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.