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

CNF-14648: spec updates in the ClusterTemplate #219

Merged

Conversation

edcdavid
Copy link
Collaborator

@edcdavid edcdavid commented Sep 26, 2024

Changes ClusterTemplate spec according to requirements. New format is below:

kind: ClusterTemplate
metadata:
  name: <name of template (name.version)>
  namespace: <namespace of cluster template>
spec:
    name:                          <string, Human readable name of the Template> 
    description:                <string, Human readable description of the Template>
    version:                       <string, Version or generation of the resource as defined by its provider.>
    templateId:                 <uuid, Identifier for the O-Cloud Template. This identifier is allocated by the O-Cloud.>  
    characteristics:          <KeyValuePairs, FFS ?>
    metadata:                    <KeyValuePairs, FFS ?>
    templates: (internal to the IMS) 
        hwTemplate:                      <name of hardware template>
        clusterInstanceDefaults: <name of configmap>
        policyTemplateDefaults: <name of configmap>
    templateParameterSchema:
        nodeClusterName:  <string> 
        oCloudSiteId:           <string>
        clusterInstanceParameters:  <schema for clusterInstance data>
        policyTemplateParameters:  <schema for policyTemplate data>

The cluster template validation is updated to include name validation as follows:

  • The metadata.name must be in the format <spec.name>.<spec.version>
  • The ClusterTemplate metadata.name must be unique in the cluster
    Also includes TemplateID validation:
  • the templateID UUID format must be valid
  • if the TemplateID is empty, one is created automatically during validation.
    To use the auto generated TemplateID. Do not configure the templateID field at all in the ClusterTemplate object. If configured and empty, GitOps/ArgoCD will try to reconcile it unsuccessfully.
    TODO:
  • unit tests
  • operator verification: scorecard, manifest, etc
  • system tests
  • Debugging Single cluster template commit
  • Testing TemplateID auto creation
  • unit tests for ExtractSubSchema and InsertSubSchema
  • improve schema in unit test

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Sep 26, 2024

@edcdavid: This pull request references CNF-14648 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set.

In response to this:

Changes ClusterTemplate spec according to requirements. New format is below:

kind: ClusterTemplate
metadata:
 name: <name of template (name.version)>
 namespace: <namespace of cluster template>
spec:
   name:                          <string, Human readable name of the Template> 
   description:                <string, Human readable description of the Template>
   version:                       <string, Version or generation of the resource as defined by its provider.>
   templateID:                 <uuid, Identifier for the O-Cloud Template. This identifier is allocated by the O-Cloud.>  
   characteristics:          <KeyValuePairs, FFS ?>
   metadata:                    <KeyValuePairs, FFS ?>
   templates: (internal to the IMS) 
       hwTemplate:                      <name of hardware template>
       clusterInstanceDefaults: <name of configmap>
       policyTemplateDefaults: <name of configmap>
   templateParameterSchema:
       nodeClusterName:  <string> 
       oCloudSiteId:           <string>
       clusterInstanceSchema:  <schema for clusterInstance data>
       policyTemplateSchema:  <schema for policyTemplate data>

The cluster template validation is updated to include name validation as follows:

  • The metadata.name must be in the format <spec.name>.<spec.version>
  • The ClusterTemplate metadata.name must be unique in the cluster

TODO:

  • unit tests
  • system tests
  • trying new single templateParameterSchema (optional since this is an internal implementation)

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 26, 2024
Copy link

openshift-ci bot commented Sep 26, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@edcdavid edcdavid marked this pull request as ready for review September 26, 2024 04:49
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 26, 2024
@edcdavid edcdavid added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 26, 2024
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 26, 2024
@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Sep 26, 2024

@edcdavid: This pull request references CNF-14648 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set.

In response to this:

Changes ClusterTemplate spec according to requirements. New format is below:

kind: ClusterTemplate
metadata:
 name: <name of template (name.version)>
 namespace: <namespace of cluster template>
spec:
   name:                          <string, Human readable name of the Template> 
   description:                <string, Human readable description of the Template>
   version:                       <string, Version or generation of the resource as defined by its provider.>
   templateID:                 <uuid, Identifier for the O-Cloud Template. This identifier is allocated by the O-Cloud.>  
   characteristics:          <KeyValuePairs, FFS ?>
   metadata:                    <KeyValuePairs, FFS ?>
   templates: (internal to the IMS) 
       hwTemplate:                      <name of hardware template>
       clusterInstanceDefaults: <name of configmap>
       policyTemplateDefaults: <name of configmap>
   templateParameterSchema:
       nodeClusterName:  <string> 
       oCloudSiteId:           <string>
       clusterInstanceSchema:  <schema for clusterInstance data>
       policyTemplateSchema:  <schema for policyTemplate data>

The cluster template validation is updated to include name validation as follows:

  • The metadata.name must be in the format <spec.name>.<spec.version>
  • The ClusterTemplate metadata.name must be unique in the cluster

TODO:

  • unit tests
  • operator verification: scorecard, manifest, etc
  • system tests
  • trying new single templateParameterSchema (optional since this is an internal implementation)

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Sep 26, 2024

@edcdavid: This pull request references CNF-14648 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set.

In response to this:

Work in progress!!!
Changes ClusterTemplate spec according to requirements. New format is below:

kind: ClusterTemplate
metadata:
 name: <name of template (name.version)>
 namespace: <namespace of cluster template>
spec:
   name:                          <string, Human readable name of the Template> 
   description:                <string, Human readable description of the Template>
   version:                       <string, Version or generation of the resource as defined by its provider.>
   templateID:                 <uuid, Identifier for the O-Cloud Template. This identifier is allocated by the O-Cloud.>  
   characteristics:          <KeyValuePairs, FFS ?>
   metadata:                    <KeyValuePairs, FFS ?>
   templates: (internal to the IMS) 
       hwTemplate:                      <name of hardware template>
       clusterInstanceDefaults: <name of configmap>
       policyTemplateDefaults: <name of configmap>
   templateParameterSchema:
       nodeClusterName:  <string> 
       oCloudSiteId:           <string>
       clusterInstanceSchema:  <schema for clusterInstance data>
       policyTemplateSchema:  <schema for policyTemplate data>

The cluster template validation is updated to include name validation as follows:

  • The metadata.name must be in the format <spec.name>.<spec.version>
  • The ClusterTemplate metadata.name must be unique in the cluster

TODO:

  • unit tests
  • operator verification: scorecard, manifest, etc
  • system tests
  • trying new single templateParameterSchema (optional since this is an internal implementation)

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 openshift-eng/jira-lifecycle-plugin repository.

@bartwensley
Copy link
Collaborator

I think this will need to be updated:

templateParameterSchema:
    nodeClusterName:  <string> 
    oCloudSiteId:           <string>
    clusterInstanceSchema:  <schema for clusterInstance data>
    policyTemplateSchema:  <schema for policyTemplate data>

The clusterInstanceSchema/policyTemplateSchema should be renamed to clusterInstanceParameters/policyTemplateParameters since they are no longer schemas on their own, but just sections in the templateParameterSchema.

@irinamihai
Copy link
Collaborator

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 26, 2024
@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Sep 26, 2024

@edcdavid: This pull request references CNF-14648 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set.

In response to this:

Work in progress!!!
Changes ClusterTemplate spec according to requirements. New format is below:

kind: ClusterTemplate
metadata:
 name: <name of template (name.version)>
 namespace: <namespace of cluster template>
spec:
   name:                          <string, Human readable name of the Template> 
   description:                <string, Human readable description of the Template>
   version:                       <string, Version or generation of the resource as defined by its provider.>
   templateID:                 <uuid, Identifier for the O-Cloud Template. This identifier is allocated by the O-Cloud.>  
   characteristics:          <KeyValuePairs, FFS ?>
   metadata:                    <KeyValuePairs, FFS ?>
   templates: (internal to the IMS) 
       hwTemplate:                      <name of hardware template>
       clusterInstanceDefaults: <name of configmap>
       policyTemplateDefaults: <name of configmap>
   templateParameterSchema:
       nodeClusterName:  <string> 
       oCloudSiteId:           <string>
       clusterInstanceSchema:  <schema for clusterInstance data>
       policyTemplateSchema:  <schema for policyTemplate data>

The cluster template validation is updated to include name validation as follows:

  • The metadata.name must be in the format <spec.name>.<spec.version>
  • The ClusterTemplate metadata.name must be unique in the cluster
    Also includes TemplateID validation:
  • the templateID UUID format must be valid
  • if the TemplateID is empty, one is created automatically during validation.
    TODO:
  • unit tests
  • operator verification: scorecard, manifest, etc
  • system tests

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Sep 26, 2024

@edcdavid: This pull request references CNF-14648 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set.

In response to this:

Work in progress!!!
Changes ClusterTemplate spec according to requirements. New format is below:

kind: ClusterTemplate
metadata:
 name: <name of template (name.version)>
 namespace: <namespace of cluster template>
spec:
   name:                          <string, Human readable name of the Template> 
   description:                <string, Human readable description of the Template>
   version:                       <string, Version or generation of the resource as defined by its provider.>
   templateID:                 <uuid, Identifier for the O-Cloud Template. This identifier is allocated by the O-Cloud.>  
   characteristics:          <KeyValuePairs, FFS ?>
   metadata:                    <KeyValuePairs, FFS ?>
   templates: (internal to the IMS) 
       hwTemplate:                      <name of hardware template>
       clusterInstanceDefaults: <name of configmap>
       policyTemplateDefaults: <name of configmap>
   templateParameterSchema:
       nodeClusterName:  <string> 
       oCloudSiteId:           <string>
       clusterInstanceSchema:  <schema for clusterInstance data>
       policyTemplateSchema:  <schema for policyTemplate data>

The cluster template validation is updated to include name validation as follows:

  • The metadata.name must be in the format <spec.name>.<spec.version>
  • The ClusterTemplate metadata.name must be unique in the cluster
    Also includes TemplateID validation:
  • the templateID UUID format must be valid
  • if the TemplateID is empty, one is created automatically during validation.
    TODO:
  • unit tests
  • operator verification: scorecard, manifest, etc
  • system tests

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Sep 26, 2024

@edcdavid: This pull request references CNF-14648 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set.

In response to this:

Work in progress!!!
Changes ClusterTemplate spec according to requirements. New format is below:

kind: ClusterTemplate
metadata:
 name: <name of template (name.version)>
 namespace: <namespace of cluster template>
spec:
   name:                          <string, Human readable name of the Template> 
   description:                <string, Human readable description of the Template>
   version:                       <string, Version or generation of the resource as defined by its provider.>
   templateID:                 <uuid, Identifier for the O-Cloud Template. This identifier is allocated by the O-Cloud.>  
   characteristics:          <KeyValuePairs, FFS ?>
   metadata:                    <KeyValuePairs, FFS ?>
   templates: (internal to the IMS) 
       hwTemplate:                      <name of hardware template>
       clusterInstanceDefaults: <name of configmap>
       policyTemplateDefaults: <name of configmap>
   templateParameterSchema:
       nodeClusterName:  <string> 
       oCloudSiteId:           <string>
       clusterInstanceSchema:  <schema for clusterInstance data>
       policyTemplateSchema:  <schema for policyTemplate data>

The cluster template validation is updated to include name validation as follows:

  • The metadata.name must be in the format <spec.name>.<spec.version>
  • The ClusterTemplate metadata.name must be unique in the cluster
    Also includes TemplateID validation:
  • the templateID UUID format must be valid
  • if the TemplateID is empty, one is created automatically during validation.
    TODO:
  • unit tests
  • operator verification: scorecard, manifest, etc
  • system tests

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Sep 27, 2024

@edcdavid: This pull request references CNF-14648 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set.

In response to this:

Changes ClusterTemplate spec according to requirements. New format is below:

kind: ClusterTemplate
metadata:
 name: <name of template (name.version)>
 namespace: <namespace of cluster template>
spec:
   name:                          <string, Human readable name of the Template> 
   description:                <string, Human readable description of the Template>
   version:                       <string, Version or generation of the resource as defined by its provider.>
   templateID:                 <uuid, Identifier for the O-Cloud Template. This identifier is allocated by the O-Cloud.>  
   characteristics:          <KeyValuePairs, FFS ?>
   metadata:                    <KeyValuePairs, FFS ?>
   templates: (internal to the IMS) 
       hwTemplate:                      <name of hardware template>
       clusterInstanceDefaults: <name of configmap>
       policyTemplateDefaults: <name of configmap>
   templateParameterSchema:
       nodeClusterName:  <string> 
       oCloudSiteId:           <string>
       clusterInstanceSchema:  <schema for clusterInstance data>
       policyTemplateSchema:  <schema for policyTemplate data>

The cluster template validation is updated to include name validation as follows:

  • The metadata.name must be in the format <spec.name>.<spec.version>
  • The ClusterTemplate metadata.name must be unique in the cluster
    Also includes TemplateID validation:
  • the templateID UUID format must be valid
  • if the TemplateID is empty, one is created automatically during validation.
    TODO:
  • unit tests
  • operator verification: scorecard, manifest, etc
  • system tests

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 openshift-eng/jira-lifecycle-plugin repository.

@edcdavid
Copy link
Collaborator Author

/cc @irinamihai @Missxiaoguo

@bartwensley
Copy link
Collaborator

Please update the ClusterTemplate example in the PR description to reflect the updated naming.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Sep 30, 2024

@edcdavid: This pull request references CNF-14648 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set.

In response to this:

Changes ClusterTemplate spec according to requirements. New format is below:

kind: ClusterTemplate
metadata:
 name: <name of template (name.version)>
 namespace: <namespace of cluster template>
spec:
   name:                          <string, Human readable name of the Template> 
   description:                <string, Human readable description of the Template>
   version:                       <string, Version or generation of the resource as defined by its provider.>
   templateID:                 <uuid, Identifier for the O-Cloud Template. This identifier is allocated by the O-Cloud.>  
   characteristics:          <KeyValuePairs, FFS ?>
   metadata:                    <KeyValuePairs, FFS ?>
   templates: (internal to the IMS) 
       hwTemplate:                      <name of hardware template>
       clusterInstanceDefaults: <name of configmap>
       policyTemplateDefaults: <name of configmap>
   templateParameterSchema:
       nodeClusterName:  <string> 
       oCloudSiteId:           <string>
       clusterInstanceParameters:  <schema for clusterInstance data>
       policyTemplateParameters:  <schema for policyTemplate data>

The cluster template validation is updated to include name validation as follows:

  • The metadata.name must be in the format <spec.name>.<spec.version>
  • The ClusterTemplate metadata.name must be unique in the cluster
    Also includes TemplateID validation:
  • the templateID UUID format must be valid
  • if the TemplateID is empty, one is created automatically during validation.
    TODO:
  • unit tests
  • operator verification: scorecard, manifest, etc
  • system tests

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 1, 2024
@irinamihai
Copy link
Collaborator

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 3, 2024
@edcdavid edcdavid force-pushed the update-cluster-template branch 3 times, most recently from 26f0525 to 7c81b40 Compare October 3, 2024 17:55
@Missxiaoguo
Copy link
Collaborator

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 3, 2024
@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Oct 3, 2024

@edcdavid: This pull request references CNF-14648 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set.

In response to this:

Changes ClusterTemplate spec according to requirements. New format is below:

kind: ClusterTemplate
metadata:
 name: <name of template (name.version)>
 namespace: <namespace of cluster template>
spec:
   name:                          <string, Human readable name of the Template> 
   description:                <string, Human readable description of the Template>
   version:                       <string, Version or generation of the resource as defined by its provider.>
   templateId:                 <uuid, Identifier for the O-Cloud Template. This identifier is allocated by the O-Cloud.>  
   characteristics:          <KeyValuePairs, FFS ?>
   metadata:                    <KeyValuePairs, FFS ?>
   templates: (internal to the IMS) 
       hwTemplate:                      <name of hardware template>
       clusterInstanceDefaults: <name of configmap>
       policyTemplateDefaults: <name of configmap>
   templateParameterSchema:
       nodeClusterName:  <string> 
       oCloudSiteId:           <string>
       clusterInstanceParameters:  <schema for clusterInstance data>
       policyTemplateParameters:  <schema for policyTemplate data>

The cluster template validation is updated to include name validation as follows:

  • The metadata.name must be in the format <spec.name>.<spec.version>
  • The ClusterTemplate metadata.name must be unique in the cluster
    Also includes TemplateID validation:
  • the templateID UUID format must be valid
  • if the TemplateID is empty, one is created automatically during validation.
    To use the auto generated TemplateID. Do not configure the templateID field at all in the ClusterTemplate object. If configured and empty, GitOps/ArgoCD will try to reconcile it unsuccessfully.
    TODO:
  • unit tests
  • operator verification: scorecard, manifest, etc
  • system tests
  • Debugging Single cluster template commit
  • Testing TemplateID auto creation
  • unit tests for ExtractSubSchema and InsertSubSchema
  • improve schema in unit test

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 openshift-eng/jira-lifecycle-plugin repository.

@irinamihai
Copy link
Collaborator

/approve

Copy link

openshift-ci bot commented Oct 3, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: irinamihai

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

The pull request process is described here

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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 3, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 277d987 into openshift-kni:main Oct 3, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants