Skip to content

Commit

Permalink
Merge pull request #46 from vshn/common-exoscale-api-key
Browse files Browse the repository at this point in the history
Create common exoscale api-secret
  • Loading branch information
zugao authored Nov 11, 2022
2 parents c1c5f55 + bcd6a09 commit 8c58910
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 119 deletions.
19 changes: 0 additions & 19 deletions packages/composition/dbaas/exoscale/mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,22 +116,3 @@ parameters:
kind: Namespace
metadata:
name: ${pkg.appcat.composition.dbaas.exoscale:secretNamespaces:mysql}

secrets:
exoscale-dbaas-api-access:
metadata:
namespace: ${crossplane:namespace}
stringData:
EXOSCALE_API_KEY: '?{vaultkv:${cluster:tenant}/${cluster:name}/appcat/dbaas/provider-exoscale/access-key}'
EXOSCALE_API_SECRET: '?{vaultkv:${cluster:tenant}/${cluster:name}/appcat/dbaas/provider-exoscale/secret-key}'

crossplane:
providerConfigs:
exoscale-dbaas:
apiVersion: exoscale.crossplane.io/v1
spec:
credentials:
source: InjectedIdentity
apiSecretRef:
name: exoscale-dbaas-api-access
namespace: ${crossplane:namespace}
10 changes: 1 addition & 9 deletions packages/composition/dbaas/exoscale/postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,6 @@ parameters:
metadata:
name: ${pkg.appcat.composition.dbaas.exoscale:secretNamespaces:postgres}

secrets:
exoscale-dbaas-api-access:
metadata:
namespace: ${crossplane:namespace}
stringData:
EXOSCALE_API_KEY: '?{vaultkv:${cluster:tenant}/${cluster:name}/appcat/dbaas/provider-exoscale/access-key}'
EXOSCALE_API_SECRET: '?{vaultkv:${cluster:tenant}/${cluster:name}/appcat/dbaas/provider-exoscale/secret-key}'

crossplane:
providerConfigs:
exoscale-dbaas:
Expand All @@ -133,5 +125,5 @@ parameters:
credentials:
source: InjectedIdentity
apiSecretRef:
name: exoscale-dbaas-api-access
name: exoscale-api-access
namespace: ${crossplane:namespace}
19 changes: 0 additions & 19 deletions packages/composition/objectstorage/exoscale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,22 +130,3 @@ parameters:
kind: Namespace
metadata:
name: ${pkg.appcat.composition.objectstorage.exoscale:secretNamespaces:iamkeys}

secrets:
exoscale-api-access:
metadata:
namespace: ${crossplane:namespace}
stringData:
EXOSCALE_API_KEY: '?{vaultkv:${cluster:tenant}/${cluster:name}/appcat/objectstorage/provider-exoscale/access-key}'
EXOSCALE_API_SECRET: '?{vaultkv:${cluster:tenant}/${cluster:name}/appcat/objectstorage/provider-exoscale/secret-key}'

crossplane:
providerConfigs:
exoscale:
apiVersion: exoscale.crossplane.io/v1
spec:
credentials:
source: InjectedIdentity
apiSecretRef:
name: exoscale-api-access
namespace: ${crossplane:namespace}
19 changes: 19 additions & 0 deletions packages/provider/exoscale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,22 @@ parameters:
providers:
exoscale:
package: ${pkg.appcat.provider.exoscale:images:provider-exoscale:registry}/${pkg.appcat.provider.exoscale:images:provider-exoscale:repository}:${pkg.appcat.provider.exoscale:images:provider-exoscale:tag}

providerConfigs:
exoscale:
apiVersion: exoscale.crossplane.io/v1
spec:
credentials:
source: InjectedIdentity
apiSecretRef:
name: exoscale-api-access
namespace: ${crossplane:namespace}

appcat:
secrets:
exoscale-api-access:
metadata:
namespace: ${crossplane:namespace}
stringData:
EXOSCALE_API_KEY: '?{vaultkv:${cluster:tenant}/${cluster:name}/appcat/provider-exoscale/access-key}'
EXOSCALE_API_SECRET: '?{vaultkv:${cluster:tenant}/${cluster:name}/appcat/provider-exoscale/secret-key}'

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
apiVersion: exoscale.crossplane.io/v1
kind: ProviderConfig
metadata:
annotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
argocd.argoproj.io/sync-wave: '10'
labels:
name: exoscale-dbaas
name: exoscale-dbaas
spec:
credentials:
apiSecretRef:
name: exoscale-dbaas-api-access
namespace: syn-crossplane
source: InjectedIdentity
---
apiVersion: kubernetes.crossplane.io/v1alpha1
kind: ProviderConfig
metadata:
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
spec:
credentials:
apiSecretRef:
name: exoscale-dbaas-api-access
name: exoscale-api-access
namespace: syn-crossplane
source: InjectedIdentity
---
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
apiVersion: exoscale.crossplane.io/v1
kind: ProviderConfig
metadata:
annotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
argocd.argoproj.io/sync-wave: '10'
labels:
name: exoscale
name: exoscale
spec:
credentials:
apiSecretRef:
name: exoscale-api-access
namespace: syn-crossplane
source: InjectedIdentity
---
apiVersion: kubernetes.crossplane.io/v1alpha1
kind: ProviderConfig
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: exoscale.crossplane.io/v1
kind: ProviderConfig
metadata:
annotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
argocd.argoproj.io/sync-wave: '10'
labels:
name: exoscale
name: exoscale
spec:
credentials:
apiSecretRef:
name: exoscale-api-access
namespace: syn-crossplane
source: InjectedIdentity
5 changes: 5 additions & 0 deletions packages/tests/provider-exoscale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ classes:
- ..provider.exoscale

# parameters: {}

parameters:
crossplane:
# This is not resolving during "commodore package compile", so we provide it explicitly
namespace: syn-crossplane

0 comments on commit 8c58910

Please sign in to comment.