Skip to content

Commit

Permalink
Bqu cr (#241)
Browse files Browse the repository at this point in the history
* Create ci.yaml

* Add new field in CR schema for BQU

---------

Co-authored-by: Elanthenral Elangovan <[email protected]>
  • Loading branch information
elan-devops and Elanthenral Elangovan authored Sep 10, 2024
1 parent 1af794c commit 5436aa3
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 15 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,23 @@ spec:
properties:
clusterCapacity:
type: integer
clusterCurrentBqu:
type: integer
clusterMaxBqu:
type: integer
clusterProvisioning:
type: integer
lastUpdated:
type: string
maxBquPerRequest:
type: integer
required:
- clusterCapacity
- clusterCurrentBqu
- clusterMaxBqu
- clusterProvisioning
- lastUpdated
- maxBquPerRequest
type: object
chargebackBusinessUnit:
description: The BU responsible for paying for the cluster.
Expand Down
9 changes: 9 additions & 0 deletions config/crd/bases/registry.ethos.adobe.com_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,23 @@ spec:
properties:
clusterCapacity:
type: integer
clusterCurrentBqu:
type: integer
clusterMaxBqu:
type: integer
clusterProvisioning:
type: integer
lastUpdated:
type: string
maxBquPerRequest:
type: integer
required:
- clusterCapacity
- clusterCurrentBqu
- clusterMaxBqu
- clusterProvisioning
- lastUpdated
- maxBquPerRequest
type: object
chargebackBusinessUnit:
description: The BU responsible for paying for the cluster.
Expand Down
3 changes: 3 additions & 0 deletions pkg/api/registry/v1/cluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@ type Capacity struct {
LastUpdated string `json:"lastUpdated"`
ClusterCapacity int `json:"clusterCapacity"`
ClusterProvisioning int `json:"clusterProvisioning"`
MaxBQUPerRequest int `json:"maxBquPerRequest"`
ClusterMaxBQU int `json:"clusterMaxBqu"`
ClusterCurrentBQU int `json:"clusterCurrentBqu"`
}

type ServiceMetadata map[string]ServiceMetadataItem
Expand Down
15 changes: 12 additions & 3 deletions pkg/apiserver/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -497,11 +497,20 @@ const docTemplate = `{
"clusterCapacity": {
"type": "integer"
},
"clusterCurrentBqu": {
"type": "integer"
},
"clusterMaxBqu": {
"type": "integer"
},
"clusterProvisioning": {
"type": "integer"
},
"lastUpdated": {
"type": "string"
},
"maxBquPerRequest": {
"type": "integer"
}
}
},
Expand Down Expand Up @@ -674,7 +683,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"domainName": {
"description": "Name of the domain\n+kubebuilder:validation:Required",
"description": "Name of the domain",
"type": "string"
},
"ecrIamArns": {
Expand All @@ -696,14 +705,14 @@ const docTemplate = `{
"type": "string"
},
"lbEndpoints": {
"description": "Load balancer endpoints\n+kubebuilder:validation:Required",
"description": "Load balancer endpoints",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"loggingEndpoints": {
"description": "Logging endpoints\n+kubebuilder:validation:Required",
"description": "Logging endpoints",
"type": "array",
"items": {
"type": "object",
Expand Down
15 changes: 12 additions & 3 deletions pkg/apiserver/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -483,11 +483,20 @@
"clusterCapacity": {
"type": "integer"
},
"clusterCurrentBqu": {
"type": "integer"
},
"clusterMaxBqu": {
"type": "integer"
},
"clusterProvisioning": {
"type": "integer"
},
"lastUpdated": {
"type": "string"
},
"maxBquPerRequest": {
"type": "integer"
}
}
},
Expand Down Expand Up @@ -660,7 +669,7 @@
"type": "object",
"properties": {
"domainName": {
"description": "Name of the domain\n+kubebuilder:validation:Required",
"description": "Name of the domain",
"type": "string"
},
"ecrIamArns": {
Expand All @@ -682,14 +691,14 @@
"type": "string"
},
"lbEndpoints": {
"description": "Load balancer endpoints\n+kubebuilder:validation:Required",
"description": "Load balancer endpoints",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"loggingEndpoints": {
"description": "Logging endpoints\n+kubebuilder:validation:Required",
"description": "Logging endpoints",
"type": "array",
"items": {
"type": "object",
Expand Down
18 changes: 9 additions & 9 deletions pkg/apiserver/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,16 @@ definitions:
properties:
clusterCapacity:
type: integer
clusterCurrentBqu:
type: integer
clusterMaxBqu:
type: integer
clusterProvisioning:
type: integer
lastUpdated:
type: string
maxBquPerRequest:
type: integer
type: object
github_com_adobe_cluster-registry_pkg_api_registry_v1.ClusterSpec:
properties:
Expand Down Expand Up @@ -204,9 +210,7 @@ definitions:
github_com_adobe_cluster-registry_pkg_api_registry_v1.Extra:
properties:
domainName:
description: |-
Name of the domain
+kubebuilder:validation:Required
description: Name of the domain
type: string
ecrIamArns:
additionalProperties:
Expand All @@ -224,14 +228,10 @@ definitions:
lbEndpoints:
additionalProperties:
type: string
description: |-
Load balancer endpoints
+kubebuilder:validation:Required
description: Load balancer endpoints
type: object
loggingEndpoints:
description: |-
Logging endpoints
+kubebuilder:validation:Required
description: Logging endpoints
items:
additionalProperties:
type: string
Expand Down

0 comments on commit 5436aa3

Please sign in to comment.