Skip to content

Commit

Permalink
Merge pull request #143 from vshn/fix/encrypted_pvc_bug
Browse files Browse the repository at this point in the history
Don't patch sgcluster here, but rather with the composition function
  • Loading branch information
Kidswiss authored May 9, 2023
2 parents c85c300 + 6b1030e commit c32e890
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 21 deletions.
1 change: 0 additions & 1 deletion component/vshn_postgres.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,6 @@ local sgCluster = {
pgPlans)),
comp.FromCompositeFieldPath('spec.parameters.scheduling.nodeSelector', 'spec.forProvider.manifest.spec.pods.scheduling.nodeSelector'),

comp.FromCompositeFieldPathWithTransformMatch('spec.parameters.encryption.enabled', 'spec.forProvider.manifest.spec.pods.persistentVolume.storageClass', [ { type: 'literal', literal: 'true', result: 'ssd-encrypted' } ]),
comp.FromCompositeFieldPath('spec.parameters.service.majorVersion', 'spec.forProvider.manifest.spec.postgres.version'),
comp.FromCompositeFieldPath('metadata.labels[crossplane.io/composite]', 'spec.forProvider.manifest.spec.sgInstanceProfile'),
comp.FromCompositeFieldPath('metadata.labels[crossplane.io/composite]', 'spec.forProvider.manifest.spec.configurations.sgPostgresConfig'),
Expand Down
10 changes: 0 additions & 10 deletions tests/golden/vshn/appcat/appcat/21_composition_vshn_postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -491,16 +491,6 @@ spec:
- fromFieldPath: spec.parameters.scheduling.nodeSelector
toFieldPath: spec.forProvider.manifest.spec.pods.scheduling.nodeSelector
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.encryption.enabled
toFieldPath: spec.forProvider.manifest.spec.pods.persistentVolume.storageClass
transforms:
- match:
patterns:
- literal: 'true'
result: ssd-encrypted
type: literal
type: match
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.service.majorVersion
toFieldPath: spec.forProvider.manifest.spec.postgres.version
type: FromCompositeFieldPath
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -576,16 +576,6 @@ spec:
- fromFieldPath: spec.parameters.scheduling.nodeSelector
toFieldPath: spec.forProvider.manifest.spec.pods.scheduling.nodeSelector
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.encryption.enabled
toFieldPath: spec.forProvider.manifest.spec.pods.persistentVolume.storageClass
transforms:
- match:
patterns:
- literal: 'true'
result: ssd-encrypted
type: literal
type: match
type: FromCompositeFieldPath
- fromFieldPath: spec.parameters.service.majorVersion
toFieldPath: spec.forProvider.manifest.spec.postgres.version
type: FromCompositeFieldPath
Expand Down

0 comments on commit c32e890

Please sign in to comment.