Skip to content
This repository was archived by the owner on Oct 30, 2024. It is now read-only.
Closed
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
35 changes: 29 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,36 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).



## [Unreleased]

## [0.2.3] - 2020-04-08
- Add pod networking parameters

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd like those changelogs to be more meaningful. The biggest value for me (as a dev) is to see the migration path from one version to another. What those changes are doing can be figured from the docs.

Suggested change
- Add pod networking parameters
### Added
- Add add `.spec.pods` field to `awsconfigs.infrastructure.giantswarm.io` CR.


## [0.2.6] - 2020-04-15

### Added

- Add Helm revision number to chart CR status.
- Document G8sControlPlane CRD [#405](https://github.com/giantswarm/apiextensions/pull/405)
- Document Chart CRD [#406](https://github.com/giantswarm/apiextensions/pull/406)

## [0.2.5] - 2020-04-09

### Changed

- Fix a problem in the MachineDeployment CRD YAML file [#404](https://github.com/giantswarm/apiextensions/pull/404)

## [0.2.4] - 2020-04-08

### Changed

- Fix path of CR and CRD yaml files for Cluster and MachineDeployment [#403](https://github.com/giantswarm/apiextensions/pull/403)
- Add schema documentation for CertConfig [#401](https://github.com/giantswarm/apiextensions/pull/401)

## [0.2.3] - 2020-04-08

### Added

- Add Helm revision number to chart CR status.
- Extend Chart CR documentation.

## [0.2.2] - 2020-04-07

Expand Down Expand Up @@ -82,11 +102,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0



[Unreleased]: https://github.com/giantswarm/apiextensions/compare/v0.2.1...HEAD

[Unreleased]: https://github.com/giantswarm/apiextensions/compare/v0.2.6...HEAD
[0.2.6]: https://github.com/giantswarm/apiextensions/compare/v0.2.5...v0.2.6
[0.2.5]: https://github.com/giantswarm/apiextensions/compare/v0.2.4...v0.2.5
[0.2.4]: https://github.com/giantswarm/apiextensions/compare/v0.2.3...v0.2.4
[0.2.3]: https://github.com/giantswarm/apiextensions/compare/v0.2.2...v0.2.3
[0.2.2]: https://github.com/giantswarm/apiextensions/compare/v0.2.1...v0.2.2
[0.2.1]: https://github.com/giantswarm/apiextensions/compare/v0.2.0...v0.2.1
[0.2.0]: https://github.com/giantswarm/apiextensions/compare/v0.1.2...v0.2.0
[0.1.2]: https://github.com/giantswarm/apiextensions/compare/v0.1.1...v0.1.2
[0.1.1]: https://github.com/giantswarm/apiextensions/compare/v0.1.0...v0.1.1

[0.1.0]: https://github.com/giantswarm/apiextensions/releases/tag/v0.1.0
21 changes: 21 additions & 0 deletions docs/cr/application.giantswarm.io_v1alpha1_chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: application.giantswarm.io/v1alpha1
kind: Chart
metadata:
annotations:
giantswarm.io/docs: https://pkg.go.dev/github.com/giantswarm/apiextensions/pkg/apis/application/v1alpha1?tab=doc#Chart
creationTimestamp: null
name: prometheus
spec:
config:
configMap:
name: f2def-chart-values
namespace: f2def
resourceVersion: ""
secret:
name: f2def-chart-values
namespace: f2def
resourceVersion: ""
name: prometheus
namespace: monitoring
tarballURL: prometheus-1.0.1.tgz
version: 1.0.1
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
14 changes: 14 additions & 0 deletions docs/cr/infrastructure.giantswarm.io_v1alpha2_g8scontrolplane.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: infrastructure.giantswarm.io/v1alpha2
kind: Cluster
metadata:
annotations:
giantswarm.io/docs: https://pkg.go.dev/github.com/giantswarm/apiextensions@v0.2.5/pkg/apis/infrastructure/v1alpha2?tab=doc#G8sControlPlane
creationTimestamp: null
name: 0p8h5
spec:
infrastructureRef:
apiVersion: infrastructure.giantswarm.io/v1alpha2
kind: AWSControlPlane
name: 0p8h5
namespace: default
replicas: 1
94 changes: 94 additions & 0 deletions docs/crd/application.giantswarm.io_chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
name: charts.application.giantswarm.io
spec:
group: application.giantswarm.io
names:
kind: Chart
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:
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"
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"
properties:
name:
description: |
Name of the ConfigMap resource.
type: string
namespace:
description: |
Namespace holding the ConfigMap resource.
type: string
resourceVersion:
type: string
required:
- name
- namespace
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.
properties:
name:
description: |
Name of the Secret resource.
type: string
namespace:
description: |
Namespace holding the Secret resource.
type: string
resourceVersion:
type: string
required:
- name
- namespace
type: object
type: object
name:
description: |
Name of this application Chart.
type: string
namespace:
description: |
Kubernetes namespace in which to install the workloads defined by this App Chart in
the current cluster.
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
type: string
version:
description: |
Version of the application Chart to be deployed.
type: string
required:
- name
- namespace
- tarballURL
- version
type: object
type: object
version: v1alpha1
9 changes: 9 additions & 0 deletions docs/crd/infrastructure.giantswarm.io_awscluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@ spec:
EC2 instance type to use for the master node.
type: string
type: object
pods:
description: |
Pod networking configuration
properties:
cidrBlock:
description: |
CIDR used for the pod network.
type: string
type: object
region:
description: |
AWS region the cluster is to be running in.
Expand Down
55 changes: 55 additions & 0 deletions docs/crd/infrastructure.giantswarm.io_g8scontrolplane.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
name: g8scontrolplanes.infrastructure.giantswarm.io
spec:
conversion:
strategy: None
group: infrastructure.giantswarm.io
names:
kind: G8sControlPlane
plural: g8scontrolplanes
singular: g8scontrolplane
scope: Namespaced
subresources:
status: {}
versions:
- name: v1alpha1
served: false
storage: false
- 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.
properties:
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
properties:
apiVersion:
type: string
kind:
type: string
name:
type: string
namespace:
type: string
type: object
replicas:
description: |
Number of master nodes and Etcd instances to set up.
enum:
- 1
- 3
type: integer
type: object
type: object
served: true
storage: true
48 changes: 47 additions & 1 deletion pkg/apis/application/v1alpha1/chart_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import (
)

const (
kindChart = "Chart"
kindChart = "Chart"
chartDocumentationLink = "https://pkg.go.dev/github.com/giantswarm/apiextensions/pkg/apis/application/v1alpha1?tab=doc#Chart"
)

const chartCRDYAML = `
Expand All @@ -27,42 +28,75 @@ spec:
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.
type: object
properties:
spec:
type: object
properties:
name:
description: |
Name of this application Chart.
type: string
namespace:
description: |
Kubernetes namespace in which to install the workloads defined by this App Chart in
the current cluster.
type: string
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.
type: object
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.
type: object
properties:
name:
description: |
Name of the ConfigMap resource.
type: string
namespace:
description: |
Namespace holding the ConfigMap resource.
type: string
resourceVersion:
type: string
required: ["name", "namespace"]
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.
type: object
properties:
name:
description: |
Name of the Secret resource.
type: string
namespace:
description: |
Namespace holding the Secret resource.
type: string
resourceVersion:
type: string
required: ["name", "namespace"]
tarballURL:
description: |
URL of the application Chart to be deployed. The chart package must exist in the
App Catalog storage.
type: string
format: uri
version:
description: |
Version of the application Chart to be deployed.
type: string
required: ["name", "namespace", "tarballURL", "version"]
`
Expand Down Expand Up @@ -103,6 +137,18 @@ func NewChartTypeMeta() metav1.TypeMeta {
}
}

// NewChartCR returns an Chart Custom Resource.
func NewChartCR() *Chart {
return &Chart{
ObjectMeta: metav1.ObjectMeta{
Annotations: map[string]string{
crDocsAnnotation: chartDocumentationLink,
},
},
TypeMeta: NewChartTypeMeta(),
}
}

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

Expand Down
Loading