Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This platform uses **Upbound DevEx** with:
## Overview

This reference platform outlines a specialized API for generating an EKS cluster
([XCluster](apis/definition.yaml)) that incorporates XRs from the specified configurations:
([Cluster](apis/clusters/definition.yaml)) that incorporates XRs from the specified configurations:

* [upbound-configuration-aws-lb-controller](https://github.com/upbound/configuration-aws-lb-controller)
* [upbound-configuration-aws-network](https://github.com/upbound/configuration-aws-network)
Expand All @@ -37,11 +37,11 @@ This reference platform outlines a specialized API for generating an EKS cluster
```mermaid
graph LR;
MyApp(My App)---MyCluster(XRC: my-cluster);
MyCluster---XRD1(XRD: XCluster);
MyCluster---XRD1(XRD: Cluster);
MyApp---MyDB(XRC: my-db);
MyDB---XRD2(XRD: XSQLInstance);
subgraph Configuration:upbound/platform-ref-aws;
XRD1---Composition(XEKS, XNetwork, XAWSLBController, XFlux, XOss);
XRD1---Composition(EKS, Network, AWSLBController, Flux, Oss);
XRD2---Composition2(Composition);
end
subgraph Provider:upbound/provider-aws
Expand Down Expand Up @@ -90,7 +90,7 @@ up project build
up test run tests/*

# Render compositions with examples
up composition render apis/definition.yaml apis/composition.yaml examples/cluster-claim.yaml
up composition render apis/clusters/definition.yaml apis/clusters/composition.yaml examples/cluster/cluster.yaml
```

## Using the Platform
Expand Down
8 changes: 4 additions & 4 deletions apis/composition.yaml → apis/clusters/composition.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
apiVersion: apiextensions.crossplane.io/v1
kind: Composition
metadata:
name: xclusters.aws.platformref.upbound.io
name: clusters.aws.platformref.upbound.io
spec:
writeConnectionSecretsToNamespace: crossplane-system
compositeTypeRef:
apiVersion: aws.platformref.upbound.io/v1alpha1
kind: XCluster
kind: Cluster
mode: Pipeline
pipeline:
- functionRef:
name: upbound-platform-ref-awsxcluster
step: xcluster
name: upbound-platform-ref-awscluster
step: cluster
- functionRef:
name: crossplane-contrib-function-auto-ready
step: crossplane-contrib-function-auto-ready
192 changes: 192 additions & 0 deletions apis/clusters/definition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
apiVersion: apiextensions.crossplane.io/v2
kind: CompositeResourceDefinition
metadata:
name: clusters.aws.platformref.upbound.io
spec:
group: aws.platformref.upbound.io
names:
categories:
- crossplane
kind: Cluster
plural: clusters
scope: Namespaced
versions:
- name: v1alpha1
referenceable: true
served: true
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
parameters:
type: object
description: Cluster configuration parameters.
properties:
clusterName:
type: string
description: The name of the cluster on the cloud platform.
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.
iam:
type: object
description: IAM configuration to connect as ClusterAdmin.
properties:
principalArn:
description: The IAM Principal ARN to connect as ClusterAdmin.
type: string
managementPolicies:
description: ManagementPolicies for AWS EC2 resources. Defaults to ["*"] which includes all operations (Create, Observe, Update, Delete, LateInitialize). To orphan resources on deletion, use ["Create", "Observe", "Update", "LateInitialize"].
type: array
items:
type: string
enum:
- "*"
- Create
- Observe
- Update
- Delete
- LateInitialize
default: ["*"]
providerConfigName:
description: Crossplane ProviderConfig to use for provisioning this resources
type: string
default: default
version:
type: string
description: Kubernetes version of the Cluster
enum:
- "1.33"
- "1.32"
- "1.31"
default: "1.32"
nodes:
type: object
description: Cluster node configuration parameters.
properties:
count:
type: integer
description: Desired node count, from 1 to 100.
instanceType:
type: string
description: instance types associated with the Node Group.
default: t3.small
required:
- count
- instanceType
operators:
description: Configuration for operators.
type: object
default:
flux:
version: "2.10.6"
fluxSync:
version: "1.7.2"
prometheus:
version: "52.1.0"
properties:
flux:
description: Configuration for the Flux GitOps operator.
type: object
properties:
version:
description: flux helm-chart version to run.
type: string
default: "2.10.6"
required:
- version
fluxSync:
description: Configuration for the Flux Sync Helm-Chart.
type: object
properties:
version:
description: flux sync helm-chart version to run.
type: string
default: "1.7.2"
required:
- version
prometheus:
description: Configuration for the Prometheus Helm-Chart.
type: object
properties:
version:
description: prometheus helm-chart version to run.
type: string
default: "52.1.0"
required:
- version
gitops:
description: GitOps configure gitops system
type: object
properties:
git:
type: object
properties:
interval:
default: "5m0s"
description: Interval at which the GitRepository URL is checked for
updates. This interval is approximate and may be subject to jitter
to ensure efficient use of resources.
pattern: ^([0-9]+(\.[0-9]+)?(ms|s|m|h))+$
type: string
timeout:
default: "60s"
description: Timeout for Git operations like cloning, defaults to
60s.
pattern: ^([0-9]+(\.[0-9]+)?(ms|s|m))+$
type: string
url:
description: URL specifies the Git repository URL, it can be an HTTP/S
or SSH address.
pattern: ^(http|https|ssh)://.*$
type: string
path:
type: string
default: "/"
ref:
description: Reference specifies the Git reference to resolve and
monitor for changes.
type: object
properties:
name:
description: "Name of the reference to check out; takes precedence
over Branch, Tag and SemVer. \n It must be a valid Git reference:
https://git-scm.com/docs/git-check-ref-format#_description Examples:
\"refs/heads/main\", \"refs/tags/v0.1.0\", \"refs/pull/420/head\",
\"refs/merge-requests/1/head\""
type: string
required:
- interval
- timeout
- url
- path
- ref
required:
- git
required:
- managementPolicies
- gitops
- id
- nodes
- operators
- providerConfigName
- region
required:
- parameters
status:
type: object
properties:
clusterName:
type: string
subnetIds:
type: array
items:
type: string
oidcProvider:
type: string
Loading
Loading