Skip to content

Commit

Permalink
Experiment with AppOfApps: rearrange Provider and its config
Browse files Browse the repository at this point in the history
  • Loading branch information
jonashackt committed Jan 22, 2024
1 parent a95c931 commit a661f12
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 19 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,8 @@ spec:
target:
name: aws-secrets-from-doppler
# as we use a lower case key name transformer in our ClusterSecretStore
# we need to access our 'CREDS' key in Doppler as 'creds'
dataFrom:
- find:
path: creds
Expand Down
11 changes: 11 additions & 0 deletions argocd/applications/crossplane-provider-aws-s3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
name: provider-aws-s3
annotations:
argocd.argoproj.io/sync-wave: "2"
spec:
package: xpkg.upbound.io/upbound/provider-aws-s3:v0.46.0
packagePullPolicy: Always
revisionActivationPolicy: Automatic
revisionHistoryLimit: 1
28 changes: 9 additions & 19 deletions argocd/applications/crossplane-provider-config-aws.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
apiVersion: aws.upbound.io/v1beta1
kind: ProviderConfig
metadata:
name: provider-config-aws
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
name: default
annotations:
argocd.argoproj.io/sync-wave: "3"
spec:
project: default
source:
repoURL: https://github.com/jonashackt/crossplane-argocd
targetRevision: HEAD
path: upbound/provider-aws-s3/config
destination:
namespace: default
server: https://kubernetes.default.svc
# Using syncPolicy.automated here, otherwise the deployement of our Crossplane provider will fail with
# 'Resource not found in cluster: pkg.crossplane.io/v1/Provider:provider-aws-s3'
syncPolicy:
automated:
prune: true
credentials:
source: Secret
secretRef:
namespace: external-secrets
name: aws-secrets-from-doppler
key: creds
File renamed without changes.
23 changes: 23 additions & 0 deletions argocd/temp/crossplane-provider-config-aws.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: provider-config-aws
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/sync-wave: "3"
spec:
project: default
source:
repoURL: https://github.com/jonashackt/crossplane-argocd
targetRevision: HEAD
path: upbound/provider-aws-s3/config
destination:
namespace: default
server: https://kubernetes.default.svc
# Using syncPolicy.automated here, otherwise the deployement of our Crossplane provider will fail with
# 'Resource not found in cluster: pkg.crossplane.io/v1/Provider:provider-aws-s3'
syncPolicy:
automated:
prune: true
2 changes: 2 additions & 0 deletions external-secrets/config/external-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ spec:
target:
name: aws-secrets-from-doppler

# as we use a lower case key name transformer in our ClusterSecretStore
# we need to access our 'CREDS' key in Doppler as 'creds'
dataFrom:
- find:
path: creds

0 comments on commit a661f12

Please sign in to comment.