Skip to content

Commit

Permalink
Merge pull request #7 from ytsarev/yamllint
Browse files Browse the repository at this point in the history
Setup yaml lint and local render target
  • Loading branch information
ytsarev authored Jan 4, 2024
2 parents 3ad0668 + 7b36d5b commit 6e950c7
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 55 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/yamllint.yaml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
with:
reporter: github-pr-review
filter_mode: nofilter
yamllint_flags: 'apis/'
fail_on_error: true
5 changes: 5 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
extends: default

rules:
line-length: disable
document-start: disable
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
108 changes: 54 additions & 54 deletions apis/definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 6 additions & 0 deletions examples/functions.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 6e950c7

Please sign in to comment.