The following resources are composed to implement the referenced Composite Resource Definition (XRD).
ProviderConfig
Object
Object
Object
kind: Composition
apiVersion: apiextensions.crossplane.io/v1
metadata:
name: app-backend
creationTimestamp: null
labels:
location: local
type: backend
spec:
compositeTypeRef:
apiVersion: devopstoolkitseries.com/v1alpha1
kind: App
patchSets:
- name: metadata
patches:
- fromFieldPath: metadata.labels
resources:
- name: kubernetes
base:
apiVersion: kubernetes.crossplane.io/v1alpha1
kind: ProviderConfig
spec:
credentials:
source: InjectedIdentity
patches:
- fromFieldPath: spec.id
toFieldPath: metadata.name
readinessChecks:
- type: None
- name: deployment
base:
apiVersion: kubernetes.crossplane.io/v1alpha1
kind: Object
spec:
forProvider:
manifest:
apiVersion: apps/v1
kind: Deployment
spec:
selector: {}
template:
spec:
containers:
- livenessProbe:
httpGet:
path: /
port: 80
name: backend
ports:
- containerPort: 80
readinessProbe:
httpGet:
path: /
port: 80
resources:
limits:
cpu: 250m
memory: 256Mi
requests:
cpu: 125m
memory: 128Mi
patches:
- fromFieldPath: spec.id
toFieldPath: metadata.name
transforms:
- type: string
string:
fmt: "%s-deployment"
- fromFieldPath: spec.id
toFieldPath: spec.forProvider.manifest.metadata.name
- fromFieldPath: spec.parameters.namespace
toFieldPath: spec.forProvider.manifest.metadata.namespace
- fromFieldPath: spec.id
toFieldPath: spec.forProvider.manifest.metadata.labels.app
- fromFieldPath: spec.id
toFieldPath: spec.forProvider.manifest.spec.selector.matchLabels.app
- fromFieldPath: spec.id
toFieldPath: spec.forProvider.manifest.spec.template.metadata.labels.app
- fromFieldPath: spec.parameters.image
toFieldPath: spec.forProvider.manifest.spec.template.spec.containers[0].image
- fromFieldPath: spec.parameters.port
toFieldPath: spec.forProvider.manifest.spec.template.spec.containers[0].ports[0].containerPort
- fromFieldPath: spec.parameters.port
toFieldPath: spec.forProvider.manifest.spec.template.spec.containers[0].livenessProbe.httpGet.port
- fromFieldPath: spec.parameters.port
toFieldPath: spec.forProvider.manifest.spec.template.spec.containers[0].readinessProbe.httpGet.port
- fromFieldPath: spec.id
toFieldPath: spec.providerConfigRef.name
- name: service
base:
apiVersion: kubernetes.crossplane.io/v1alpha1
kind: Object
spec:
forProvider:
manifest:
apiVersion: v1
kind: Service
spec:
ports:
- name: http
port: 8008
protocol: TCP
type: ClusterIP
patches:
- fromFieldPath: spec.id
toFieldPath: metadata.name
transforms:
- type: string
string:
fmt: "%s-service"
- fromFieldPath: spec.id
toFieldPath: spec.forProvider.manifest.metadata.name
- fromFieldPath: spec.parameters.namespace
toFieldPath: spec.forProvider.manifest.metadata.namespace
- fromFieldPath: spec.id
toFieldPath: spec.forProvider.manifest.metadata.labels.app
- fromFieldPath: spec.id
toFieldPath: spec.forProvider.manifest.spec.selector.app
- fromFieldPath: spec.parameters.port
toFieldPath: spec.forProvider.manifest.spec.ports[0].port
- fromFieldPath: spec.parameters.port
toFieldPath: spec.forProvider.manifest.spec.ports[0].targetPort
- fromFieldPath: spec.id
toFieldPath: spec.providerConfigRef.name
- name: ingress
base:
apiVersion: kubernetes.crossplane.io/v1alpha1
kind: Object
spec:
forProvider:
manifest:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
ingress.kubernetes.io/ssl-redirect: "false"
spec:
rules:
- http:
paths:
- backend:
service:
name: acme
path: /
pathType: ImplementationSpecific
patches:
- fromFieldPath: spec.id
toFieldPath: metadata.name
transforms:
- type: string
string:
fmt: "%s-ingress"
- fromFieldPath: spec.id
toFieldPath: spec.forProvider.manifest.metadata.name
- fromFieldPath: spec.parameters.namespace
toFieldPath: spec.forProvider.manifest.metadata.namespace
- fromFieldPath: spec.id
toFieldPath: spec.forProvider.manifest.metadata.labels.app
- fromFieldPath: spec.parameters.host
toFieldPath: spec.forProvider.manifest.spec.rules[0].host
- fromFieldPath: spec.id
toFieldPath: spec.forProvider.manifest.spec.rules[0].http.paths[0].backend.service.name
- fromFieldPath: spec.parameters.port
toFieldPath: spec.forProvider.manifest.spec.rules[0].http.paths[0].backend.service.port.number
- fromFieldPath: spec.id
toFieldPath: spec.providerConfigRef.name
- type: ToCompositeFieldPath
fromFieldPath: spec.forProvider.manifest.spec.rules[0].host
toFieldPath: status.host
© 2022 Upbound, Inc.
Discover the building blocksfor your internal cloud platform.