Skip to content

Commit

Permalink
Add cluster label to default-apps bundle so that it's deleted when Cl…
Browse files Browse the repository at this point in the history
…uster is deleted (#907)
  • Loading branch information
fiunchinho committed Oct 5, 2022
1 parent da9d69e commit d6f7691
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project's packages adheres to [Semantic Versioning](http://semver.org/s

## [Unreleased]

### Changed

- Add `giantswarm.io/cluster` label to the 'default-apps' bundle so that it's deleted when a `Cluster` is deleted.

## [2.23.2] - 2022-10-04

### Added
Expand Down
1 change: 1 addition & 0 deletions cmd/template/cluster/provider/capa.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ func templateDefaultAppsAWS(ctx context.Context, k8sClient k8sclient.Interface,
var err error
appYAML, err = templateapp.NewAppCR(templateapp.Config{
AppName: appName,
Cluster: config.Name,
Catalog: config.App.DefaultAppsCatalog,
InCluster: true,
Name: DefaultAppsRepoName,
Expand Down
1 change: 1 addition & 0 deletions cmd/template/cluster/provider/capg.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ func templateDefaultAppsGCP(ctx context.Context, k8sClient k8sclient.Interface,
var err error
appYAML, err = templateapp.NewAppCR(templateapp.Config{
AppName: appName,
Cluster: config.Name,
Catalog: config.App.DefaultAppsCatalog,
InCluster: true,
Name: DefaultAppsGCPRepoName,
Expand Down
1 change: 1 addition & 0 deletions cmd/template/cluster/provider/capo.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ func templateDefaultAppsOpenstack(ctx context.Context, k8sClient k8sclient.Inter
var err error
appYAML, err = templateapp.NewAppCR(templateapp.Config{
AppName: appName,
Cluster: config.Name,
Catalog: config.App.DefaultAppsCatalog,
InCluster: true,
Name: "default-apps-openstack",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ kind: App
metadata:
labels:
app-operator.giantswarm.io/version: 0.0.0
giantswarm.io/cluster: test1
name: test1-default-apps
namespace: org-test
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ kind: App
metadata:
labels:
app-operator.giantswarm.io/version: 0.0.0
giantswarm.io/cluster: test1
name: test1-default-apps
namespace: org-test
spec:
Expand Down

0 comments on commit d6f7691

Please sign in to comment.