Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(caas): use configurations in caas #17

Merged
merged 1 commit into from
Feb 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended",
"helpers:pinGitHubActionDigests",
":semanticCommits"
],
"rebaseWhen": "conflicted",
"prConcurrentLimit": 5,
"baseBranches": ["main"],
"labels": ["automated"],
"customManagers": [
{
"customType": "regex",
"description": "Bump up version in the Makefile",
"fileMatch": ["^Makefile$"],
"matchStrings": [
"UP_VERSION = (?<currentValue>.*?)\\n"
],
"datasourceTemplate": "github-releases",
"depNameTemplate": "upbound/up",
}, {
"customType": "regex",
"description": "Bump uptest version in the Makefile",
"fileMatch": ["^Makefile$"],
"matchStrings": [
"UPTEST_VERSION = (?<currentValue>.*?)\\n"
],
"datasourceTemplate": "github-releases",
"depNameTemplate": "upbound/uptest",
}, {
"customType": "regex",
"description": "Bump providers/functions/configurations in crossplane.yaml",
"fileMatch": ["crossplane.yaml"],
"matchStrings": [
"#\\s*renovate:\\s*datasource=(?<datasource>[^\\s]+)\\s+depName=(?<depName>[^\\s]+)\\s*\\n\\s*version:\\s*\"(?<currentValue>[^\"]+)\""
],
"datasourceTemplate": "{{{datasource}}}",
"depNameTemplate": "{{{depName}}}",
}
],
}
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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: yamllint
uses: reviewdog/action-yamllint@e419e43894e391d358ebf996800673d72de6c69b # v1.11.0
with:
reporter: github-pr-review
filter_mode: nofilter
yamllint_flags: 'apis/'
fail_on_error: true
22 changes: 0 additions & 22 deletions .up/examples/aws/gitops-master-cluster.yaml

This file was deleted.

26 changes: 0 additions & 26 deletions .up/examples/aws/irsa.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions .up/examples/aws/spoke-cluster.yaml

This file was deleted.

22 changes: 0 additions & 22 deletions .up/examples/azure/gitops-master-cluster.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions .up/examples/azure/spoke-cluster.yaml

This file was deleted.

22 changes: 0 additions & 22 deletions .up/examples/gcp/gitops-master-cluster.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions .up/examples/gcp/spoke-cluster.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions .up/examples/testhooks/aws-release-delete.sh

This file was deleted.

9 changes: 0 additions & 9 deletions .up/examples/testhooks/azure-release-delete.sh

This file was deleted.

9 changes: 0 additions & 9 deletions .up/examples/testhooks/gcp-release-delete.sh

This file was deleted.

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
31 changes: 22 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ PLATFORMS ?= linux_amd64
# ====================================================================================
# Setup Kubernetes tools

UP_VERSION = v0.19.1
UP_VERSION = v0.24.1
UP_CHANNEL = stable
UPTEST_VERSION = v0.5.0
UPTEST_VERSION = v0.11.0

-include build/makelib/k8s_tools.mk
# ====================================================================================
# Setup XPKG
Expand All @@ -22,7 +23,7 @@ UPTEST_VERSION = v0.5.0
# certain conventions such as the default examples root or package directory.
XPKG_DIR = $(shell pwd)
XPKG_EXAMPLES_DIR = .up/examples
XPKG_IGNORE = .github/workflows/ci.yaml,.github/workflows/tag.yml,.github/workflows/e2e.yaml,init/*.yaml,.up/examples/aws/*.yaml,.up/examples/azure/*.yaml,.up/examples/gcp/*.yaml,.up/examples/upbound/*.yaml,.work/uptest-datasource.yaml
XPKG_IGNORE = .github/workflows/*.yml,.github/workflows/*.yaml,init/*.yaml,examples/flux/*.yaml,examples/*.yaml,examples/argocd/*.yaml,.work/uptest-datasource.yaml

XPKG_REG_ORGS ?= xpkg.upbound.io/upbound
# NOTE(hasheddan): skip promoting on xpkg.upbound.io as channel tags are
Expand All @@ -32,6 +33,7 @@ XPKGS = $(PROJECT_NAME)
-include build/makelib/xpkg.mk

CROSSPLANE_NAMESPACE = upbound-system
CROSSPLANE_ARGS = "--enable-usages"
-include build/makelib/local.xpkg.mk
-include build/makelib/controlplane.mk

Expand Down Expand Up @@ -62,16 +64,27 @@ build.init: $(UP)
# End to End Testing

# This target requires the following environment variables to be set:
# - UPTEST_CLOUD_CREDENTIALS, cloud credentials for the provider being tested, e.g. export UPTEST_CLOUD_CREDENTIALS=$(cat ~/.aws/credentials)
# - To ensure the proper functioning of the end-to-end test resource pre-deletion hook, it is crucial to arrange your resources appropriately.
# You can check the basic implementation here: https://github.com/upbound/uptest/blob/main/internal/templates/01-delete.yaml.tmpl.
# $ export UPTEST_CLOUD_CREDENTIALS=$(echo "AWS='$(cat ~/.aws/credentials)'\nAZURE='$(cat ~/.azure/credentials.json)'\nGCP='$(cat ~/.gcloud/credentials.json)")
uptest: $(UPTEST) $(KUBECTL) $(KUTTL)
@$(INFO) running automated tests
@KUBECTL=$(KUBECTL) KUTTL=$(KUTTL) $(UPTEST) e2e "${UPTEST_EXAMPLE_LIST}" --setup-script=test/setup.sh --default-timeout=3200 || $(FAIL)
@KUBECTL=$(KUBECTL) KUTTL=$(KUTTL) CROSSPLANE_NAMESPACE=$(CROSSPLANE_NAMESPACE) $(UPTEST) e2e "${UPTEST_EXAMPLE_LIST}" --data-source="${UPTEST_DATASOURCE_PATH}" --setup-script=test/setup.sh --default-timeout=4800 || $(FAIL)
@$(OK) running automated tests

# This target requires the following environment variables to be set:
# - UPTEST_CLOUD_CREDENTIALS, cloud credentials for the provider being tested, e.g. export UPTEST_CLOUD_CREDENTIALS=$(cat ~/.aws/credentials)
# $ export UPTEST_CLOUD_CREDENTIALS=$(echo "AWS='$(cat ~/.aws/credentials)'\nAZURE='$(cat ~/.azure/credentials.json)'\nGCP='$(cat ~/.gcloud/credentials.json)")
e2e: build controlplane.up local.xpkg.deploy.configuration.$(PROJECT_NAME) uptest

.PHONY: uptest e2e
render:
crossplane beta render examples/flux/aws-cluster.yaml apis/composition.yaml examples/functions.yaml -r
crossplane beta render examples/flux/gcp-cluster.yaml apis/composition.yaml examples/functions.yaml -r
crossplane beta render examples/flux/azure-cluster.yaml apis/composition.yaml examples/functions.yaml -r
crossplane beta render examples/argocd/aws-cluster.yaml apis/composition.yaml examples/functions.yaml -r
crossplane beta render examples/argocd/gcp-cluster.yaml apis/composition.yaml examples/functions.yaml -r
crossplane beta render examples/argocd/azure-cluster.yaml apis/composition.yaml examples/functions.yaml -r

yamllint:
@$(INFO) running yamllint
@yamllint ./apis || $(FAIL)
@$(OK) running yamllint

.PHONY: uptest e2e render yamllint
Loading