Skip to content

Commit

Permalink
Merge pull request #494 from vshn/appcat/237/add/providerconfig_manag…
Browse files Browse the repository at this point in the history
…ement

Add providerConfig management
  • Loading branch information
Kidswiss authored Oct 2, 2024
2 parents c0610d7 + 8f575c0 commit 1f2fd06
Show file tree
Hide file tree
Showing 71 changed files with 481 additions and 727 deletions.
32 changes: 26 additions & 6 deletions class/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ parameters:
appcat:
registry: ghcr.io
repository: vshn/appcat
tag: v4.95.1
tag: v4.96.0
functionAppcat:
registry: ${appcat:images:appcat:registry}
repository: ${appcat:images:appcat:repository}
Expand Down Expand Up @@ -404,6 +404,7 @@ parameters:
providers:
cloudscale:
enabled: false
apiVersion: cloudscale.crossplane.io/v1
connectionSecretNamespace: syn-provider-cloudscale-secrets
namespace: ${appcat:crossplane:namespace}
credentials:
Expand All @@ -415,10 +416,17 @@ parameters:
package: ${appcat:images:provider-cloudscale:registry}/${appcat:images:provider-cloudscale:repository}:${appcat:images:provider-cloudscale:tag}
runtimeConfig:
serviceAccountName: provider-cloudscale
providerConfig: {}
defaultProviderConfig:
credentials:
source: InjectedIdentity
apiTokenSecretRef:
name: ${appcat:providers:cloudscale:credentials:name}
namespace: ${appcat:crossplane:namespace}
additionalProviderConfigs: []

exoscale:
enabled: false
apiVersion: exoscale.crossplane.io/v1
connectionSecretNamespace: syn-provider-exoscale-secrets
namespace: ${appcat:crossplane:namespace}
credentials:
Expand All @@ -431,38 +439,50 @@ parameters:
package: ${appcat:images:provider-exoscale:registry}/${appcat:images:provider-exoscale:repository}:${appcat:images:provider-exoscale:tag}
runtimeConfig:
serviceAccountName: provider-exoscale
providerConfig: {}
defaultProviderConfig:
credentials:
source: InjectedIdentitygit
apiSecretRef:
name: ${appcat:providers:exoscale:credentials:name}
namespace: ${appcat:crossplane:namespace}
additionalProviderConfigs: []

kubernetes:
enabled: false
apiVersion: kubernetes.crossplane.io/v1alpha1
namespace: ${appcat:crossplane:namespace}
spec:
package: ${appcat:images:provider-kubernetes:registry}/${appcat:images:provider-kubernetes:repository}:${appcat:images:provider-kubernetes:tag}
runtimeConfig:
serviceAccountName: provider-kubernetes
providerConfig: {}
defaultProviderConfig: {}
additionalProviderConfigs: []

helm:
enabled: false
apiVersion: helm.crossplane.io/v1beta1
namespace: ${appcat:crossplane:namespace}
spec:
package: ${appcat:images:provider-helm:registry}/${appcat:images:provider-helm:repository}:${appcat:images:provider-helm:tag}
runtimeConfig:
serviceAccountName: provider-helm
providerConfig: {}
defaultProviderConfig: {}
additionalProviderConfigs: []

minio:
enabled: false
apiVersion: minio.crossplane.io/v1
namespace: ${appcat:crossplane:namespace}
spec:
package: ${appcat:images:provider-minio:registry}/${appcat:images:provider-minio:repository}:${appcat:images:provider-minio:tag}
runtimeConfig:
serviceAccountName: provider-minio
defaultProviderConfig: {}
providerConfigRefs: []
additionalProviderConfigs: []

sql:
# enabled: false it will be automagically enabled for each service that needs it
enabled: ${appcat:services:vshn:postgres:enabled}
namespace: ${appcat:crossplane:namespace}
spec:
package: ${appcat:images:provider-sql:registry}/${appcat:images:provider-sql:repository}:${appcat:images:provider-sql:tag}
Expand Down
7 changes: 7 additions & 0 deletions component/common.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ local keysAndStringValues(obj, field) = if std.objectHas(obj, field) then {
for k in std.objectFieldsAll(obj[field])
} else {};

local removeFields(obj, names) = [
removeField(obj, name)
for name in names
];

{
SyncOptions: syncOptions,
VshnMetaDBaaSExoscale(dbname):
Expand Down Expand Up @@ -258,4 +263,6 @@ local keysAndStringValues(obj, field) = if std.objectHas(obj, field) then {
filterServiceByBoolean(fieldName),
KeysAndStringValues(object, fieldName):
keysAndStringValues(object, fieldName),
RemoveFields(obj, names):
removeFields(obj, names),
}
Loading

0 comments on commit 1f2fd06

Please sign in to comment.