Marketplace
BrowsePublish
Marketplace
devops-toolkit/dot-sql@v0.8.16
local-k8s-postgresql

local-k8s-postgresql

local-k8s-postgresql
devops-toolkit/dot-sql@v0.8.16local-k8s-postgresql
Type

Composition

Referenced XRD

SQL

Source Codegithub.com/vfarcic/devops-toolkit-crossplane/tree/master/packages/sql
Resources (2)

The following resources are composed to implement the referenced Composite Resource Definition (XRD).

Kind
Group
Version

ProviderConfig

helm.crossplane.io
v1beta1

Release

helm.crossplane.io
v1beta1
YAML
kind: Composition
apiVersion: apiextensions.crossplane.io/v1
metadata:
  name: local-k8s-postgresql
  creationTimestamp: null
  labels:
    db: postgresql
    provider: local-k8s
spec:
  compositeTypeRef:
    apiVersion: devopstoolkitseries.com/v1alpha1
    kind: SQL
  patchSets:
    - name: metadata
      patches:
        - fromFieldPath: metadata.labels
  resources:
    - name: helm
      base:
        apiVersion: helm.crossplane.io/v1beta1
        kind: ProviderConfig
        spec:
          credentials:
            source: InjectedIdentity
      patches:
        - fromFieldPath: spec.id
          toFieldPath: metadata.name
      readinessChecks:
        - type: None
    - name: server
      base:
        apiVersion: helm.crossplane.io/v1beta1
        kind: Release
        spec:
          forProvider:
            chart:
              name: postgresql
              repository: https://charts.bitnami.com/bitnami
              version: 12.1.2
            set:
              - name: auth.postgresPassword
                value: postgres
              - name: global.persistence.enabled
                value: "false"
              - name: primary.initdb.scripts.00_init_script\.sh
                value: |
                  export PGPASSWORD=$POSTGRES_PASSWORD
                  psql -U postgres -c 'CREATE DATABASE "cncf-demo";'
          rollbackLimit: 3
      patches:
        - fromFieldPath: spec.id
          toFieldPath: metadata.name
          transforms:
            - type: string
              string:
                fmt: "%s-postgresql"
        - fromFieldPath: spec.id
          toFieldPath: spec.providerConfigRef.name
        - fromFieldPath: spec.claimRef.namespace
          toFieldPath: spec.forProvider.namespace
      connectionDetails:
        - name: username
          type: FromValue
          value: postgres
        - name: password
          type: FromValue
          value: postgres
        - name: endpoint
          type: FromFieldPath
          fromFieldPath: metadata.name
        - name: port
          type: FromValue
          value: "5432"
  writeConnectionSecretsToNamespace: crossplane-system
Marketplace

Discover the building blocks for your internal cloud platform.

© 2022 Upbound, Inc.

SolutionsProvidersConfigurations
LearnDocumentationTry for Free
MorePrivacy PolicyTerms & Conditions
Marketplace

© 2022 Upbound, Inc.

Marketplace

Discover the building blocksfor your internal cloud platform.