diff --git a/.github/workflows/yamllint.yaml b/.github/workflows/yamllint.yaml new file mode 100644 index 0000000..16a78d3 --- /dev/null +++ b/.github/workflows/yamllint.yaml @@ -0,0 +1,15 @@ +name: yamllint +on: [pull_request] +jobs: + yamllint: + name: runner / yamllint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: yamllint + uses: reviewdog/action-yamllint@v1.9.0 + with: + reporter: github-pr-review + filter_mode: nofilter + yamllint_flags: 'apis/' + fail_on_error: true diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..669c864 --- /dev/null +++ b/.yamllint @@ -0,0 +1,5 @@ +extends: default + +rules: + line-length: disable + document-start: disable diff --git a/Makefile b/Makefile index 7822e77..e3698de 100644 --- a/Makefile +++ b/Makefile @@ -67,4 +67,12 @@ uptest: $(UPTEST) $(KUBECTL) $(KUTTL) # - UPTEST_CLOUD_CREDENTIALS, cloud credentials for the provider being tested, e.g. export UPTEST_CLOUD_CREDENTIALS=$(cat ~/.aws/credentials) e2e: build controlplane.up local.xpkg.deploy.configuration.$(PROJECT_NAME) uptest -.PHONY: uptest e2e +render: + crossplane beta render examples/app-claim.yaml apis/composition.yaml examples/functions.yaml -r + +yamllint: + @$(INFO) running yamllint + @yamllint ./apis || $(FAIL) + @$(OK) running yamllint + +.PHONY: uptest e2e render yamllint diff --git a/apis/definition.yaml b/apis/definition.yaml index 16f1e29..6d1276e 100644 --- a/apis/definition.yaml +++ b/apis/definition.yaml @@ -12,57 +12,57 @@ spec: kind: App plural: apps versions: - - name: v1alpha1 - served: true - referenceable: true - schema: - openAPIV3Schema: - type: object - properties: - spec: - type: object - properties: - parameters: - type: object - description: App configuration parameters. - properties: - deletionPolicy: - description: Delete the external resources when the Claim/XR is deleted. Defaults to Delete - enum: - - Delete - - Orphan - type: string - default: Delete - providerConfigName: - description: Crossplane ProviderConfig to use for provisioning this resources - type: string - helm: - type: object - description: Configuration for operators. - properties: - chart: - type: object - description: Configuration for the Helm Chart - properties: - name: - type: string - description: chart name - repo: - type: string - description: chart repo - version: - type: string - description: chart version - passwordSecretRef: - type: object - description: "A reference to the Secret object containing database credentials" - properties: - namespace: - type: string - name: - type: string - required: - - namespace - - name - required: - - providerConfigName + - name: v1alpha1 + served: true + referenceable: true + schema: + openAPIV3Schema: + type: object + properties: + spec: + type: object + properties: + parameters: + type: object + description: App configuration parameters. + properties: + deletionPolicy: + description: Delete the external resources when the Claim/XR is deleted. Defaults to Delete + enum: + - Delete + - Orphan + type: string + default: Delete + providerConfigName: + description: Crossplane ProviderConfig to use for provisioning this resources + type: string + helm: + type: object + description: Configuration for operators. + properties: + chart: + type: object + description: Configuration for the Helm Chart + properties: + name: + type: string + description: chart name + repo: + type: string + description: chart repo + version: + type: string + description: chart version + passwordSecretRef: + type: object + description: "A reference to the Secret object containing database credentials" + properties: + namespace: + type: string + name: + type: string + required: + - namespace + - name + required: + - providerConfigName diff --git a/examples/functions.yaml b/examples/functions.yaml new file mode 100644 index 0000000..98c28bd --- /dev/null +++ b/examples/functions.yaml @@ -0,0 +1,6 @@ +apiVersion: pkg.crossplane.io/v1beta1 +kind: Function +metadata: + name: upbound-function-patch-and-transform +spec: + package: xpkg.upbound.io/upbound/function-patch-and-transform:v0.2.1