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

ARO-9390 Add v2alpha1 model #962

Merged
merged 4 commits into from
Jul 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
40 changes: 40 additions & 0 deletions model/clusters_mgmt/v2alpha1/UpgradePolicyStateValue.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
Copyright (c) 2024 Red Hat, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Overall state of a cluster upgrade policy.
enum UpgradePolicyStateValue {
// Upgrade policy set but an upgrade wasn't scheduled yet
Pending

// Upgrade policy set and was scheduled
Scheduled

// Upgrade started
Started

// Upgrade completed (temporary state - the policy will be removed in case of
// manual upgrade, or move back to pending in case of automatic upgrade)
Completed

// Upgrade failed
Failed

// Upgrade is taking longer than expected
Delayed

// Upgrade got cancelled (temporary state - the policy will get removed).
Cancelled
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
Copyright (c) 2024 Red Hat, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Representation of an addon catalog source object used by addon versions.
struct AdditionalCatalogSource {
// ID of the additional catalog source
ID String

// Name of the additional catalog source.
Name String

// Image of the additional catalog source.
Image String

// Indicates is this additional catalog source is enabled for the addon
Enabled Boolean
}
25 changes: 25 additions & 0 deletions model/clusters_mgmt/v2alpha1/add_on_config_type.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
Copyright (c) 2024 Red Hat, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Representation of an add-on config.
// The attributes under it are to be used by the addon once its installed in the cluster.
class AddOnConfig {
// List of environment variables for the addon
AddOnEnvironmentVariables []AddOnEnvironmentVariable

// List of secret propagations for the addon
SecretPropagations []AddOnSecretPropagation
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
Copyright (c) 2024 Red Hat, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Representation of an add-on env object.
class AddOnEnvironmentVariable {
// Name of the env object.
Name String

// Value of the env object.
Value String
}
69 changes: 69 additions & 0 deletions model/clusters_mgmt/v2alpha1/add_on_inquiries_resource.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
Copyright (c) 2024 Red Hat, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Manages add-on inquiries, inquiries perform validation of add-on(s) on a per cluster basis
// based on add-on conditions and requirements.
resource AddonInquiries {
method List {
// Index of the requested page, where one corresponds to the first page.
in out Page Integer = 1

// Maximum number of items that will be contained in the returned page.
in out Size Integer = 100

// Search criteria.
//
// The syntax of this parameter is similar to the syntax of the _where_ clause of an
// SQL statement, but using the names of the attributes of the add-on instead of
// the names of the columns of a table. For example, in order to retrieve all the
// add-ons with a name starting with `my` the value should be:
//
// ```sql
// name like 'my%'
// ```
//
// If the parameter isn't provided, or if the value is empty, then all the add-ons
// that the user has permission to see will be returned.
in Search String

// Order criteria.
//
// The syntax of this parameter is similar to the syntax of the _order by_ clause of
// a SQL statement, but using the names of the attributes of the add-on instead of
// the names of the columns of a table. For example, in order to sort the add-ons
// descending by name the value should be:
//
// ```sql
// name desc
// ```
//
// If the parameter isn't provided, or if the value is empty, then the order of the
// results is undefined.
in Order String

// Total number of items of the collection that match the search criteria,
// regardless of the size of the page.
out Total Integer

// Retrieved list of add-ons.
out Items []AddOn
}

locator AddonInquiry {
target AddonInquiry
variable AddonID
}
}
22 changes: 22 additions & 0 deletions model/clusters_mgmt/v2alpha1/add_on_inquiry_resource.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
Copyright (c) 2024 Red Hat, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Manages a specific add-on inquiry
resource AddonInquiry {
method Get {
out Body AddOn
}
}
26 changes: 26 additions & 0 deletions model/clusters_mgmt/v2alpha1/add_on_install_mode_type.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
Copyright (c) 2024 Red Hat, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Representation of an add-on InstallMode field.
enum AddOnInstallMode {
// This mode means that the the addon CRD exists in a single specific namespace.
// This namespace is reflected by the TargetNamespace addon field
OwnNamespace

// This mode means that the addon is deployed in all namespaces.
// However, the addon status is retrieved from the target namespace
AllNamespaces
}
23 changes: 23 additions & 0 deletions model/clusters_mgmt/v2alpha1/add_on_installation_billing.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
Copyright (c) 2024 Red Hat, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Representation of an add-on installation billing.
class AddOnInstallationBilling {
// Billing Model for addon resources
BillingModel BillingModel
// Account ID for billing market place
BillingMarketplaceAccount String
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
Copyright (c) 2024 Red Hat, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Representation of an add-on installation parameter.
class AddOnInstallationParameter {
// Value of the parameter.
Value String
}
32 changes: 32 additions & 0 deletions model/clusters_mgmt/v2alpha1/add_on_installation_resource.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
Copyright (c) 2024 Red Hat, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Manages a specific add-on installation.
resource AddOnInstallation {
// Retrieves the details of the add-on installation.
method Get {
out Body AddOnInstallation
}

// Updates the add-on installation.
method Update {
in out Body AddOnInstallation
}

// Delete an add-on installation and remove it from the collection of add-on installations on the cluster.
method Delete {
}
}
33 changes: 33 additions & 0 deletions model/clusters_mgmt/v2alpha1/add_on_installation_state_type.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
Copyright (c) 2024 Red Hat, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Representation of an add-on installation State field.
enum AddOnInstallationState {
// The add-on is in pending state.
Pending

// The add-on is still being installed.
Installing

// The add-on is being deleted.
Deleting

// Error during installation.
Failed

// The add-on is ready to be used.
Ready
}
Loading
Loading