diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 97880da..249c673 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -135,7 +135,7 @@ jobs: version: ${{env.XP_VERSION}} - name: Build the Configuration Package - run: crossplane xpkg build --package-root="package" --examples-root="examples" -o ${{env.XPKG_NAME}}-${{needs.version.outputs.version}}.xpkg + run: crossplane xpkg build --package-root="package-configuration" --examples-root="examples" -o ${{env.XPKG_NAME}}-${{needs.version.outputs.version}}.xpkg - name: Save the Configuration package name id: save-configuration-package-name diff --git a/package-configuration/apis/apps/composition.yaml b/package-configuration/apis/apps/composition.yaml new file mode 100644 index 0000000..2227b21 --- /dev/null +++ b/package-configuration/apis/apps/composition.yaml @@ -0,0 +1,16 @@ +apiVersion: apiextensions.crossplane.io/v1 +kind: Composition +metadata: + name: apps.platform.upbound.io +spec: + compositeTypeRef: + apiVersion: platform.upbound.io/v1 + kind: App + mode: Pipeline + pipeline: + - functionRef: + name: upbound-function-template-typescript-function + step: app + - functionRef: + name: crossplane-contrib-function-auto-ready + step: crossplane-contrib-function-auto-ready diff --git a/package-configuration/apis/apps/definition.yaml b/package-configuration/apis/apps/definition.yaml new file mode 100644 index 0000000..8488db1 --- /dev/null +++ b/package-configuration/apis/apps/definition.yaml @@ -0,0 +1,275 @@ +apiVersion: apiextensions.crossplane.io/v1 +kind: CompositeResourceDefinition +metadata: + name: apps.platform.upbound.io +spec: + group: platform.upbound.io + scope: Namespaced + names: + categories: + - crossplane + kind: App + plural: apps + versions: + - name: v1 + referenceable: true + schema: + openAPIV3Schema: + description: App is the Schema for the App API. + properties: + spec: + description: AppSpec defines the desired state of App. + properties: + parameters: + properties: + workloads: + properties: + app1: + properties: + affinity: + properties: + nodeAffinity: + properties: + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + type: object + type: array + type: object + type: array + type: object + type: object + type: object + autoscaling: + properties: + enabled: + type: boolean + maxReplicas: + type: number + minReplicas: + type: number + targetCPUUtilizationPercentage: + type: number + type: object + fullnameOverride: + type: string + image: + properties: + pullPolicy: + type: string + repository: + type: string + tag: + type: string + type: object + imagePullSecrets: + items: + type: object + type: array + ingress: + properties: + annotations: + additionalProperties: + type: string + type: object + className: + type: string + enabled: + type: boolean + hosts: + items: + properties: + host: + type: string + paths: + items: + properties: + path: + type: string + pathType: + type: string + type: object + type: array + type: object + type: array + tls: + items: + properties: + hosts: + items: + type: string + type: array + secretName: + type: string + type: object + type: array + type: object + livenessProbe: + properties: + httpGet: + properties: + path: + type: string + port: + type: string + type: object + initialDelaySeconds: + type: integer + periodSeconds: + type: integer + type: object + nameOverride: + type: string + namespace: + type: string + nodeSelector: + additionalProperties: + type: string + type: object + podAnnotations: + additionalProperties: + type: string + type: object + podLabels: + additionalProperties: + type: string + type: object + podSecurityContext: + properties: + fsGroup: + type: integer + type: object + providerConfigName: + description: Name of the ProviderConfig to use for Kubernetes resources + type: string + default: "default" + readinessProbe: + properties: + httpGet: + properties: + path: + type: string + port: + type: string + type: object + initialDelaySeconds: + type: integer + periodSeconds: + type: integer + type: object + replicaCount: + type: number + resources: + properties: + limits: + additionalProperties: + type: string + type: object + requests: + additionalProperties: + type: string + type: object + type: object + securityContext: + properties: + capabilities: + properties: + drop: + items: + type: string + type: array + type: object + readOnlyRootFilesystem: + type: boolean + runAsNonRoot: + type: boolean + runAsUser: + type: integer + type: object + service: + properties: + port: + type: number + type: + type: string + type: object + serviceAccount: + properties: + annotations: + additionalProperties: + type: string + type: object + automount: + type: boolean + create: + type: boolean + name: + type: string + type: object + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + value: + type: string + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + name: + type: string + readOnly: + type: boolean + type: object + type: array + volumes: + items: + properties: + configMap: + properties: + name: + type: string + type: object + name: + type: string + secret: + properties: + optional: + type: boolean + secretName: + type: string + type: object + type: object + type: array + type: object + type: object + type: object + type: object + status: + description: AppStatus defines the observed state of App. + type: object + required: + - spec + type: object + served: true diff --git a/package/crossplane.yaml b/package-configuration/crossplane.yaml similarity index 95% rename from package/crossplane.yaml rename to package-configuration/crossplane.yaml index 3b38209..0497eb5 100644 --- a/package/crossplane.yaml +++ b/package-configuration/crossplane.yaml @@ -1,6 +1,6 @@ --- -apiVersion: meta.pkg.crossplane.io/v1beta1 -kind: Function +apiVersion: meta.pkg.crossplane.io/v1 +kind: Configuration metadata: name: function-template-typescript annotations: