Skip to content

Commit

Permalink
Merge pull request #445 from RedHatInsights/psav/metadata_fix
Browse files Browse the repository at this point in the history
Fix genconfig schema for metadata
  • Loading branch information
psav authored Sep 16, 2021
2 parents ca95a5a + 0e525a6 commit bf4c777
Show file tree
Hide file tree
Showing 3 changed files with 392 additions and 337 deletions.
2 changes: 1 addition & 1 deletion controllers/cloud.redhat.com/clowdapp_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ func updateMetadata(app *crd.ClowdApp, appConfig *config.AppConfig) {
metadata.Deployments = append(metadata.Deployments, deploymentMetadata)
}

appConfig.Metadata = metadata
appConfig.Metadata = &metadata
}

func (r *ClowdAppReconciler) runProviders(log logr.Logger, provider *providers.Provider, a *crd.ClowdApp) error {
Expand Down
36 changes: 36 additions & 0 deletions controllers/cloud.redhat.com/config/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
"logging": {
"$ref": "#/definitions/LoggingConfig"
},
"metadata": {
"$ref": "#/definitions/AppMetadata"
},
"kafka": {
"$ref": "#/definitions/KafkaConfig"
},
Expand Down Expand Up @@ -85,6 +88,39 @@
"type"
]
},
"AppMetadata": {
"title": "AppMetadata",
"type": "object",
"description": "Arbitrary metadata pertaining to the application application",
"properties": {
"deployments": {
"description": "Metadata pertaining to an application's deployments",
"type": "array",
"items": {
"$ref": "#/definitions/DeploymentMetadata"
}
}
}
},
"DeploymentMetadata": {
"title": "DeploymentMetadata",
"type": "object",
"description": "Deployment Metadata",
"properties": {
"name": {
"description": "Name of deployment",
"type": "string"
},
"image": {
"description": "Image used by deployment",
"type": "string"
}
},
"required": [
"name",
"image"
]
},
"CloudWatchConfig": {
"title": "CloudWatchConfig",
"type": "object",
Expand Down
Loading

0 comments on commit bf4c777

Please sign in to comment.