Skip to content

Commit

Permalink
feat: add composition status 'managed' field
Browse files Browse the repository at this point in the history
  • Loading branch information
matteogastaldello committed Sep 28, 2024
1 parent 2c58979 commit 60d9a67
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,12 @@ func (e *external) Create(ctx context.Context, mg resource.Managed) error {
})

res := crdgen.Generate(ctx, crdgen.Options{
Managed: true,
WorkDir: dir,
GVK: gvk,
Categories: []string{"compositions", "comps"},
SpecJsonSchemaGetter: generator.ChartJsonSchemaGetter(pkg, dir),
Managed: true,
WorkDir: dir,
GVK: gvk,
Categories: []string{"compositions", "comps"},
SpecJsonSchemaGetter: generator.ChartJsonSchemaGetter(pkg, dir),
StatusJsonSchemaGetter: StaticJsonSchemaGetter(),

Check warning on line 337 in internal/controllers/compositiondefinitions/compositiondefinitions.go

View check run for this annotation

Codecov / codecov/patch

internal/controllers/compositiondefinitions/compositiondefinitions.go#L332-L337

Added lines #L332 - L337 were not covered by tests
})
if res.Err != nil {
return res.Err
Expand Down
20 changes: 20 additions & 0 deletions internal/controllers/compositiondefinitions/support.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,26 @@ const (
},
"helmChartVersion": {
"type": "string"
},
"managed": {
"type": "array",
"items": {
"type": "object",
"properties": {
"apiVersion": {
"type": "string"
},
"resource": {
"type": "string"
},
"name": {
"type": "string"
},
"namespace": {
"type": "string"
}
}
}
}
}
}`
Expand Down

0 comments on commit 60d9a67

Please sign in to comment.