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(split): use abstractions for flux and prometheus #47

Merged
merged 1 commit into from
Jan 5, 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@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
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ PLATFORMS ?= linux_amd64

UP_VERSION = v0.21.0
UP_CHANNEL = stable
UPTEST_VERSION = v0.6.1
UPTEST_VERSION = v0.9.0

-include build/makelib/k8s_tools.mk
# ====================================================================================
Expand Down Expand Up @@ -62,11 +62,16 @@ build.init: $(UP)
# - UPTEST_CLOUD_CREDENTIALS, cloud credentials for the provider being tested, e.g. export UPTEST_CLOUD_CREDENTIALS=$(cat azure.json)
uptest: $(UPTEST) $(KUBECTL) $(KUTTL)
@$(INFO) running automated tests
@KUBECTL=$(KUBECTL) KUTTL=$(KUTTL) $(UPTEST) e2e examples/cluster-claim.yaml,examples/postgres-claim.yaml,examples/mariadb-claim.yaml,examples/app-claim.yaml --setup-script=test/setup.sh --default-timeout=2400 || $(FAIL)
@KUBECTL=$(KUBECTL) KUTTL=$(KUTTL) CROSSPLANE_NAMESPACE=$(CROSSPLANE_NAMESPACE) $(UPTEST) e2e examples/cluster-claim.yaml,examples/postgres-claim.yaml,examples/mariadb-claim.yaml,examples/app-claim.yaml --setup-script=test/setup.sh --default-timeout=2400 || $(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 azure.json)
e2e: build controlplane.up local.xpkg.deploy.configuration.$(PROJECT_NAME) uptest

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

.PHONY: uptest e2e yamllint
40 changes: 31 additions & 9 deletions apis/cluster/aks/composition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ spec:
- fromFieldPath: spec.parameters.id
toFieldPath: metadata.name
transforms:
- type: string
string:
fmt: "%s-aks"
- type: string
string:
fmt: "%s-aks"
- fromFieldPath: spec.parameters.id
toFieldPath: spec.forProvider.resourceGroupNameSelector.matchLabels[azure.platform.upbound.io/network-id]
- fromFieldPath: spec.parameters.id
Expand All @@ -65,9 +65,9 @@ spec:
- fromFieldPath: metadata.uid
toFieldPath: spec.writeConnectionSecretToRef.name
transforms:
- type: string
string:
fmt: "%s-akscluster"
- type: string
string:
fmt: "%s-akscluster"
connectionDetails:
- fromConnectionSecretKey: kubeconfig
- name: providerConfigHelm
Expand All @@ -87,8 +87,30 @@ spec:
- fromFieldPath: metadata.uid
toFieldPath: spec.credentials.secretRef.name
transforms:
- type: string
string:
fmt: "%s-akscluster"
- type: string
string:
fmt: "%s-akscluster"
readinessChecks:
- type: None
- name: providerConfigKubernetes
base:
apiVersion: kubernetes.crossplane.io/v1alpha1
kind: ProviderConfig
spec:
credentials:
source: Secret
secretRef:
key: kubeconfig
patches:
- fromFieldPath: spec.parameters.id
toFieldPath: metadata.name
- fromFieldPath: spec.writeConnectionSecretToRef.namespace
toFieldPath: spec.credentials.secretRef.namespace
- fromFieldPath: metadata.uid
toFieldPath: spec.credentials.secretRef.name
transforms:
- type: string
string:
fmt: "%s-akscluster"
readinessChecks:
- type: None
140 changes: 70 additions & 70 deletions apis/cluster/aks/definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,74 +8,74 @@ spec:
kind: XAKS
plural: xaks
connectionSecretKeys:
- kubeconfig
- kubeconfig
versions:
- name: v1alpha1
served: true
referenceable: true
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
parameters:
type: object
description: AKS configuration parameters.
properties:
id:
type: string
description: ID of this Cluster that other objects will use to refer to it.
region:
type: string
description: Region is the region you'd like your resource to be created in.
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
default: default
version:
description: Kubernetes version
type: string
enum:
- "1.27.3"
- "1.26.6"
- "1.25.11"
default: "1.27.3"
nodes:
type: object
description: AKS node configuration parameters.
properties:
count:
type: integer
description: Desired node count
instanceType:
type: string
description: instance types associated with the Node Group.
default: Standard_B2s
required:
- count
- instanceType
required:
- id
- region
- deletionPolicy
- providerConfigName
- nodes
required:
- parameters
status:
description: A Status represents the observed state
properties:
aks:
description: Freeform field containing status information for aks
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
- name: v1alpha1
served: true
referenceable: true
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
parameters:
type: object
description: AKS configuration parameters.
properties:
id:
type: string
description: ID of this Cluster that other objects will use to refer to it.
region:
type: string
description: Region is the region you'd like your resource to be created in.
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
default: default
version:
description: Kubernetes version
type: string
enum:
- "1.27.3"
- "1.26.6"
- "1.25.11"
default: "1.27.3"
nodes:
type: object
description: AKS node configuration parameters.
properties:
count:
type: integer
description: Desired node count
instanceType:
type: string
description: instance types associated with the Node Group.
default: Standard_B2s
required:
- count
- instanceType
required:
- id
- region
- deletionPolicy
- providerConfigName
- nodes
required:
- parameters
status:
description: A Status represents the observed state
properties:
aks:
description: Freeform field containing status information for aks
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
Loading