Skip to content

Commit

Permalink
Random
Browse files Browse the repository at this point in the history
  • Loading branch information
vfarcic committed Aug 31, 2022
1 parent c2c22e5 commit 986cf71
Show file tree
Hide file tree
Showing 17 changed files with 250 additions and 153 deletions.
2 changes: 1 addition & 1 deletion crossplane-config/config-k8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ kind: Configuration
metadata:
name: crossplane-k8s
spec:
package: xpkg.upbound.io/devops-toolkit/dot-kubernetes:v0.4.32
package: xpkg.upbound.io/devops-toolkit/dot-kubernetes:v0.4.35
2 changes: 1 addition & 1 deletion crossplane-config/config-sql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ kind: Configuration
metadata:
name: crossplane-sql
spec:
package: xpkg.upbound.io/devops-toolkit/dot-sql:v0.4.2
package: xpkg.upbound.io/devops-toolkit/dot-sql:v0.4.3
33 changes: 33 additions & 0 deletions examples/app/backend-azure-postgresql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
apiVersion: devopstoolkitseries.com/v1alpha1
kind: AppClaim
metadata:
name: silly-demo
spec:
id: silly-demo
compositionSelector:
matchLabels:
type: backend-db
location: local
parameters:
namespace: production
image: vfarcic/sql-demo:0.1.10
port: 8080
host: silly-demo.20.81.12.26.nip.io
---
apiVersion: devopstoolkitseries.com/v1alpha1
kind: SQLClaim
metadata:
name: silly-demo
spec:
id: silly-demo
compositionSelector:
matchLabels:
provider: azure
db: postgresql
parameters:
version: "13"
size: small
namespace: production
writeConnectionSecretToRef:
name: silly-demo
2 changes: 1 addition & 1 deletion examples/app/backend-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ spec:
namespace: production
image: vfarcic/silly-demo:1.0.8
port: 8080
host: silly-demo.34.139.13.104.nip.io
host: silly-demo.20.81.12.26.nip.io
2 changes: 1 addition & 1 deletion packages/k8s/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Publish To Upbound

```bash
export VERSION=v0.4.32
export VERSION=v0.4.35

# Replace `[...]` with the Upbound Cloud account
export UP_ACCOUNT=[...]
Expand Down
51 changes: 50 additions & 1 deletion packages/k8s/aks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ spec:
metadata:
name: crossplane-sql
spec:
package: xpkg.upbound.io/devops-toolkit/dot-sql:v0.4.2
package: xpkg.upbound.io/devops-toolkit/dot-sql:v0.4.3
patches:
- fromFieldPath: spec.id
toFieldPath: metadata.name
Expand All @@ -425,3 +425,52 @@ spec:
fmt: '%s-config-sql'
- fromFieldPath: spec.id
toFieldPath: spec.providerConfigRef.name
- name: jet-azure-p
base:
apiVersion: kubernetes.crossplane.io/v1alpha1
kind: Object
spec:
forProvider:
manifest:
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
name: crossplane-provider-jet-azure
spec:
package: crossplane/provider-jet-azure:v0.12.0
patches:
- fromFieldPath: spec.id
toFieldPath: metadata.name
transforms:
- type: string
string:
fmt: '%s-jet-azure-p'
- fromFieldPath: spec.id
toFieldPath: spec.providerConfigRef.name
- name: jet-azure-pc
base:
apiVersion: kubernetes.crossplane.io/v1alpha1
kind: Object
spec:
forProvider:
manifest:
apiVersion: azure.jet.crossplane.io/v1alpha1
kind: ProviderConfig
metadata:
name: default
spec:
credentials:
source: Secret
secretRef:
namespace: crossplane-system
name: azure-creds
key: creds
patches:
- fromFieldPath: spec.id
toFieldPath: metadata.name
transforms:
- type: string
string:
fmt: '%s-jet-azure-pc'
- fromFieldPath: spec.id
toFieldPath: spec.providerConfigRef.name
100 changes: 50 additions & 50 deletions packages/k8s/eks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -448,55 +448,6 @@ spec:
patches:
- fromFieldPath: spec.id
toFieldPath: metadata.name
- name: aws-p
base:
apiVersion: kubernetes.crossplane.io/v1alpha1
kind: Object
spec:
forProvider:
manifest:
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
name: crossplane-provider-aws
spec:
package: crossplane/provider-aws:v0.24.1
patches:
- fromFieldPath: spec.id
toFieldPath: metadata.name
transforms:
- type: string
string:
fmt: '%s-aws-p'
- fromFieldPath: spec.id
toFieldPath: spec.providerConfigRef.name
- name: aws-pc
base:
apiVersion: kubernetes.crossplane.io/v1alpha1
kind: Object
spec:
forProvider:
manifest:
apiVersion: aws.crossplane.io/v1beta1
kind: ProviderConfig
metadata:
name: default
spec:
credentials:
source: Secret
secretRef:
namespace: crossplane-system
name: aws-creds
key: creds
patches:
- fromFieldPath: spec.id
toFieldPath: metadata.name
transforms:
- type: string
string:
fmt: '%s-aws-pc'
- fromFieldPath: spec.id
toFieldPath: spec.providerConfigRef.name
- name: helm
base:
apiVersion: helm.crossplane.io/v1beta1
Expand Down Expand Up @@ -828,7 +779,7 @@ spec:
metadata:
name: crossplane-sql
spec:
package: xpkg.upbound.io/devops-toolkit/dot-sql:v0.4.2
package: xpkg.upbound.io/devops-toolkit/dot-sql:v0.4.3
patches:
- fromFieldPath: spec.id
toFieldPath: metadata.name
Expand All @@ -838,3 +789,52 @@ spec:
fmt: '%s-config-sql'
- fromFieldPath: spec.id
toFieldPath: spec.providerConfigRef.name
- name: aws-p
base:
apiVersion: kubernetes.crossplane.io/v1alpha1
kind: Object
spec:
forProvider:
manifest:
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
name: crossplane-provider-aws
spec:
package: crossplane/provider-aws:v0.24.1
patches:
- fromFieldPath: spec.id
toFieldPath: metadata.name
transforms:
- type: string
string:
fmt: '%s-aws-p'
- fromFieldPath: spec.id
toFieldPath: spec.providerConfigRef.name
- name: aws-pc
base:
apiVersion: kubernetes.crossplane.io/v1alpha1
kind: Object
spec:
forProvider:
manifest:
apiVersion: aws.crossplane.io/v1beta1
kind: ProviderConfig
metadata:
name: default
spec:
credentials:
source: Secret
secretRef:
namespace: crossplane-system
name: aws-creds
key: creds
patches:
- fromFieldPath: spec.id
toFieldPath: metadata.name
transforms:
- type: string
string:
fmt: '%s-aws-pc'
- fromFieldPath: spec.id
toFieldPath: spec.providerConfigRef.name
46 changes: 23 additions & 23 deletions packages/k8s/gke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,28 +96,6 @@ spec:
- type: MatchString
fieldPath: status.atProvider.status
matchString: RUNNING
- name: gcp-p
base:
apiVersion: kubernetes.crossplane.io/v1alpha1
kind: Object
spec:
forProvider:
manifest:
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
name: crossplane-provider-gcp
spec:
package: crossplane/provider-gcp:v0.21.0
patches:
- fromFieldPath: spec.id
toFieldPath: metadata.name
transforms:
- type: string
string:
fmt: '%s-gcp-p'
- fromFieldPath: spec.id
toFieldPath: spec.providerConfigRef.name
- name: helm
base:
apiVersion: helm.crossplane.io/v1beta1
Expand Down Expand Up @@ -463,7 +441,7 @@ spec:
metadata:
name: crossplane-sql
spec:
package: xpkg.upbound.io/devops-toolkit/dot-sql:v0.4.2
package: xpkg.upbound.io/devops-toolkit/dot-sql:v0.4.3
patches:
- fromFieldPath: spec.id
toFieldPath: metadata.name
Expand All @@ -473,3 +451,25 @@ spec:
fmt: '%s-config-sql'
- fromFieldPath: spec.id
toFieldPath: spec.providerConfigRef.name
- name: gcp-p
base:
apiVersion: kubernetes.crossplane.io/v1alpha1
kind: Object
spec:
forProvider:
manifest:
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
name: crossplane-provider-gcp
spec:
package: crossplane/provider-gcp:v0.21.0
patches:
- fromFieldPath: spec.id
toFieldPath: metadata.name
transforms:
- type: string
string:
fmt: '%s-gcp-p'
- fromFieldPath: spec.id
toFieldPath: spec.providerConfigRef.name
2 changes: 1 addition & 1 deletion packages/sql/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Publish To Upbound

```bash
export VERSION=v0.4.2
export VERSION=v0.4.3

# Replace `[...]` with the Upbound Cloud account
export UP_ACCOUNT=[...]
Expand Down
13 changes: 13 additions & 0 deletions packages/sql/azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,17 @@ spec:
key: password
publicNetworkAccessEnabled: true
sslMinimalTlsVersionEnforced: TLS1_2
writeConnectionSecretToRef:
namespace: crossplane-system
patches:
- fromFieldPath: spec.id
toFieldPath: metadata.name
- fromFieldPath: metadata.uid
toFieldPath: spec.writeConnectionSecretToRef.name
transforms:
- type: string
string:
fmt: "%s-sql"
- fromFieldPath: spec.parameters.version
toFieldPath: spec.forProvider.version
- fromFieldPath: spec.parameters.size
Expand All @@ -67,3 +75,8 @@ spec:
- type: string
string:
fmt: '%s-creds'
connectionDetails:
- fromConnectionSecretKey: username
- fromConnectionSecretKey: password
- fromConnectionSecretKey: endpoint
- fromConnectionSecretKey: port
50 changes: 0 additions & 50 deletions packages/ytt-k8s/_ytt_lib/aws/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -260,53 +260,3 @@ spec:
patches:
- fromFieldPath: spec.id
toFieldPath: metadata.name
- name: aws-p
base:
apiVersion: kubernetes.crossplane.io/v1alpha1
kind: Object
spec:
forProvider:
manifest:
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
name: crossplane-provider-aws
spec:
package: crossplane/provider-aws:v0.24.1
patches:
- fromFieldPath: spec.id
toFieldPath: metadata.name
transforms:
- type: string
string:
fmt: '%s-aws-p'
- fromFieldPath: spec.id
toFieldPath: spec.providerConfigRef.name
- name: aws-pc
base:
apiVersion: kubernetes.crossplane.io/v1alpha1
kind: Object
spec:
forProvider:
manifest:
apiVersion: aws.crossplane.io/v1beta1
kind: ProviderConfig
metadata:
name: default
spec:
credentials:
source: Secret
secretRef:
namespace: crossplane-system
name: aws-creds
key: creds
patches:
- fromFieldPath: spec.id
toFieldPath: metadata.name
transforms:
- type: string
string:
fmt: '%s-aws-pc'
- fromFieldPath: spec.id
toFieldPath: spec.providerConfigRef.name

Loading

0 comments on commit 986cf71

Please sign in to comment.