Skip to content

Commit

Permalink
feat: sync pvcs
Browse files Browse the repository at this point in the history
  • Loading branch information
waveywaves committed Jul 13, 2023
1 parent 4d390f9 commit 19bcbff
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# To re-generate a bundle for another specific version without changing the standard setup, you can:
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
VERSION ?= 0.0.24
VERSION ?= 0.0.25

# CHANNELS define the bundle channels used in the bundle.
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable")
Expand Down
2 changes: 1 addition & 1 deletion chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ version: 0.1.3
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v0.0.24"
appVersion: "v0.0.25"
dependencies:
- name: common
repository: https://charts.bitnami.com/bitnami
Expand Down
4 changes: 4 additions & 0 deletions controllers/uffizzicluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,9 @@ func (r *UffizziClusterReconciler) createVClusterHelmRelease(ctx context.Context
PersistentVolumes: VClusterSyncPersistentVolumes{
Enabled: true,
},
PersistentVolumeClaims: VClusterSyncPersistentVolumeClaims{
Enabled: true,
},
},
}

Expand All @@ -383,6 +386,7 @@ func (r *UffizziClusterReconciler) createVClusterHelmRelease(ctx context.Context

if uCluster.Spec.Storage.SyncFromManifests != nil {
uClusterHelmValues.Sync.PersistentVolumes.Enabled = *uCluster.Spec.Storage.SyncFromManifests
uClusterHelmValues.Sync.PersistentVolumeClaims.Enabled = *uCluster.Spec.Storage.SyncFromManifests
uClusterHelmValues.Sync.StorageClasses.Enabled = *uCluster.Spec.Storage.SyncFromManifests
}

Expand Down
11 changes: 8 additions & 3 deletions controllers/vcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ type VClusterSyncer struct {
}

type VClusterSync struct {
Ingresses VClusterSyncIngresses `json:"ingresses,omitempty"`
PersistentVolumes VClusterSyncPersistentVolumes `json:"persistentvolumes,omitempty"`
StorageClasses VClusterSyncStorageClasses `json:"storageclasses,omitempty"`
Ingresses VClusterSyncIngresses `json:"ingresses,omitempty"`
PersistentVolumes VClusterSyncPersistentVolumes `json:"persistentvolumes,omitempty"`
PersistentVolumeClaims VClusterSyncPersistentVolumeClaims `json:"persistentvolumeclaims,omitempty"`
StorageClasses VClusterSyncStorageClasses `json:"storageclasses,omitempty"`
}

type VClusterSyncIngresses struct {
Expand All @@ -42,6 +43,10 @@ type VClusterSyncPersistentVolumes struct {
Enabled bool `json:"enabled"`
}

type VClusterSyncPersistentVolumeClaims struct {
Enabled bool `json:"enabled"`
}

type VClusterSyncStorageClasses struct {
Enabled bool `json:"enabled"`
}
Expand Down

0 comments on commit 19bcbff

Please sign in to comment.