Skip to content
This repository was archived by the owner on Oct 30, 2024. It is now read-only.
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Add pod field to AWSCluster.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Add pod field to AWSCluster.
- Add `.spec.cluster.pods` field to AWSCluster.

- Replace custom `time.Time` wrapper `DeepCopyTime` with Kubernetes built-in `metav1.Time`.
- Update `architect-orb` to `v0.8.8`.

Expand Down
53 changes: 21 additions & 32 deletions config/crd/bases/application.giantswarm.io_charts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ spec:
scope: Namespaced
validation:
openAPIV3Schema:
description: |
Defines a Chart resource, which represents an application version running on the cluster.
This resource is created and managed by chart-operator running in each tenant cluster.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
Expand All @@ -36,25 +33,19 @@ spec:
spec:
properties:
config:
description: |
Defines the aggregated configuration values for the application chart. It is
created by app-operator in the tenant cluster to be used as values file by
chart operator during the helm installation process.
proccess.
description: Config is the config to be applied when the chart is deployed.
properties:
configMap:
description: |
Defines a reference to a ConfigMap where is the aggregated configuration values
from App Catalog, Cluster and User that will be used as values file in the helm
installation or upgrade process.
description: ConfigMap references a config map containing values
that should be applied to the chart.
properties:
name:
description: |
Name of the ConfigMap resource.
description: Name is the name of the config map containing chart
values to apply, e.g. prometheus-chart-values.
type: string
namespace:
description: |
Namespace holding the ConfigMap resource.
description: Namespace is the namespace of the values config
map, e.g. monitoring.
type: string
resourceVersion:
description: ResourceVersion is the Kubernetes resource version
Expand All @@ -67,17 +58,16 @@ spec:
- resourceVersion
type: object
secret:
description: |
Defines a reference to a Secret where is the aggregated configuration values from App Catalog, Cluster and User that will be used as values file in the helm
installation or upgrade process.
description: Secret references a secret containing secret values
that should be applied to the chart.
properties:
name:
description: |
Name of the Secret resource.
description: Name is the name of the secret containing chart
values to apply, e.g. prometheus-chart-secret.
type: string
namespace:
description: |
Namespace holding the Secret resource.
description: Namespace is the namespace of the secret, e.g.
kube-system.
type: string
resourceVersion:
description: ResourceVersion is the Kubernetes resource version
Expand All @@ -94,21 +84,20 @@ spec:
- secret
type: object
name:
description: Name of this application Chart.
description: Name is the name of the Helm chart to be deployed. e.g.
kubernetes-prometheus
type: string
namespace:
description: |
Kubernetes namespace in which to install the workloads defined by this App Chart in
the current cluster.
description: Namespace is the namespace where the chart should be deployed.
e.g. monitoring
type: string
tarballURL:
description: |
URL of the application Chart to be deployed. The chart package must exist in the
App Catalog storage.
description: TarballURL is the URL for the Helm chart tarball to be
deployed. e.g. https://path/to/prom-1-0-0.tgz"
type: string
version:
description: |
Version of the application Chart to be deployed.
description: Version is the version of the chart that should be deployed.
e.g. 1.0.0
type: string
required:
- config
Expand Down
10 changes: 10 additions & 0 deletions config/crd/bases/infrastructure.giantswarm.io_awsclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,16 @@ spec:
- availabilityZone
- instanceType
type: object
pods:
description: Pod network configuration.
properties:
cidrBlock:
description: Subnet size, expresses as the count of leading
1 bits in the subnet mask of this subnet.
Comment on lines +114 to +115
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the property is expected to carry a string like "1.2.3.4/8" then I think this description does not explain it well. I would expect something like

"IPv4 address block used for pods, in CIDR notation."

Also we might want to provide a validation regex.

type: string
required:
- cidrBlock
type: object
region:
description: Region is the AWS region the cluster is to be running
in.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ spec:
- name: v1alpha2
schema:
openAPIV3Schema:
description: |
This resource represents an abstract control plane (Kubernetes master node and Etcd server)
of a tenant cluster in a Giant Swarm installation. It is reconciled by cluster-operator.
For implementation details it references a provider specific resource.
description: G8sControlPlane defines the Control Plane Nodes (Kubernetes Master
Nodes) of a Giant Swarm Tenant Cluster.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
Expand All @@ -39,9 +37,8 @@ spec:
spec:
properties:
infrastructureRef:
description: |
Reference to an [AWSControlPlane](https://docs.giantswarm.io/reference/cp-k8s-api/awscontrolplanes.infrastructure.giantswarm.io/)
resource defining provider specific details for the c
description: InfrastructureRef is a required reference to provider-specific
Infrastructure.
properties:
apiVersion:
description: API version of the referent.
Expand Down Expand Up @@ -77,8 +74,7 @@ spec:
type: string
type: object
replicas:
description: |
Number of master nodes and Etcd instances to set up.
description: Replicas is the number replicas of the master node.
type: integer
required:
- infrastructureRef
Expand All @@ -95,6 +91,9 @@ spec:
replicas:
description: Total number of non-terminated machines targeted by this
control plane (their labels match the selector).
enum:
- 1
- 3
format: int32
type: integer
type: object
Expand Down
2 changes: 2 additions & 0 deletions docs/cr/infrastructure.giantswarm.io_v1alpha2_awscluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ spec:
master:
availabilityZone: eu-central-1b
instanceType: m5.2xlarge
pods:
cidrBlock: 10.2.0.0/16
region: eu-central-1
130 changes: 96 additions & 34 deletions docs/crd/application.giantswarm.io_chart.yaml
Original file line number Diff line number Diff line change
@@ -1,94 +1,156 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
creationTimestamp: null
name: charts.application.giantswarm.io
spec:
group: application.giantswarm.io
names:
kind: Chart
listKind: ChartList
plural: charts
singular: chart
scope: Namespaced
subresources:
status: {}
validation:
openAPIV3Schema:
description: |
Defines a Chart resource, which represents an application version running on the cluster.
This resource is created and managed by chart-operator running in each tenant cluster.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
config:
description: "Defines the aggregated configuration values for the application
chart. It is \ncreated by app-operator in the tenant cluster to be
used as values file by \nchart operator during the helm installation
process.\nproccess. \n"
description: Config is the config to be applied when the chart is deployed.
properties:
configMap:
description: "Defines a reference to a ConfigMap where is the aggregated
configuration values \nfrom App Catalog, Cluster and User that
will be used as values file in the helm\ninstallation or upgrade
process.\n"
description: ConfigMap references a config map containing values
that should be applied to the chart.
properties:
name:
description: |
Name of the ConfigMap resource.
description: Name is the name of the config map containing chart
values to apply, e.g. prometheus-chart-values.
type: string
namespace:
description: |
Namespace holding the ConfigMap resource.
description: Namespace is the namespace of the values config
map, e.g. monitoring.
type: string
resourceVersion:
description: ResourceVersion is the Kubernetes resource version
of the configmap. Used to detect if the configmap has changed,
e.g. 12345.
type: string
required:
- name
- namespace
- resourceVersion
type: object
secret:
description: |
Defines a reference to a Secret where is the aggregated configuration values from App Catalog, Cluster and User that will be used as values file in the helm
installation or upgrade process.
description: Secret references a secret containing secret values
that should be applied to the chart.
properties:
name:
description: |
Name of the Secret resource.
description: Name is the name of the secret containing chart
values to apply, e.g. prometheus-chart-secret.
type: string
namespace:
description: |
Namespace holding the Secret resource.
description: Namespace is the namespace of the secret, e.g.
kube-system.
type: string
resourceVersion:
description: ResourceVersion is the Kubernetes resource version
of the secret. Used to detect if the secret has changed, e.g.
12345.
type: string
required:
- name
- namespace
- resourceVersion
type: object
required:
- configMap
- secret
type: object
name:
description: |
Name of this application Chart.
description: Name is the name of the Helm chart to be deployed. e.g.
kubernetes-prometheus
type: string
namespace:
description: |
Kubernetes namespace in which to install the workloads defined by this App Chart in
the current cluster.
description: Namespace is the namespace where the chart should be deployed.
e.g. monitoring
type: string
tarballURL:
description: "URL of the application Chart to be deployed. The chart
package must exist in the \nApp Catalog storage.\n"
format: uri
description: TarballURL is the URL for the Helm chart tarball to be
deployed. e.g. https://path/to/prom-1-0-0.tgz"
type: string
version:
description: |
Version of the application Chart to be deployed.
description: Version is the version of the chart that should be deployed.
e.g. 1.0.0
type: string
required:
- config
- name
- namespace
- tarballURL
- version
type: object
status:
properties:
appVersion:
description: AppVersion is the value of the AppVersion field in the
Chart.yaml of the deployed chart. This is an optional field with the
version of the component being deployed. e.g. 0.21.0. https://docs.helm.sh/developing_charts/#the-chart-yaml-file
type: string
reason:
description: Reason is the description of the last status of helm release
when the chart is not installed successfully, e.g. deploy resource
already exists.
type: string
release:
description: Release is the status of the Helm release for the deployed
chart.
properties:
lastDeployed:
description: LastDeployed is the time when the deployed chart was
last deployed.
format: date-time
type: string
revision:
description: Revision is the revision number for this deployed chart.
type: integer
status:
description: Status is the status of the deployed chart, e.g. DEPLOYED.
type: string
required:
- lastDeployed
- revision
- status
type: object
version:
description: Version is the value of the Version field in the Chart.yaml
of the deployed chart. e.g. 1.0.0.
type: string
required:
- appVersion
- release
- version
type: object
required:
- metadata
- spec
type: object
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
Loading