This repository was archived by the owner on Oct 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Improve CRD generation #410
Merged
Merged
Changes from all commits
Commits
Show all changes
81 commits
Select commit
Hold shift + click to select a range
6b2ddaa
save work
tfussell 63ec6f1
save work
tfussell fb19459
move to separate packages
tfussell 0a86a03
save work
tfussell 20efc19
save work
tfussell 03842a0
sort imports
tfussell d65466f
save work
tfussell cd50b3f
Merge branch 'generate-crds' into improve-generation
tfussell 831f2e8
save work
tfussell 7faa833
save work
tfussell 282a0fc
Merge branch 'master' into generate-crds
tfussell d61d01f
remove commented out gen.sh lines
tfussell 9874630
vet
tfussell 99ca148
remove controller-tools
tfussell 3c517cc
newline
tfussell a4830f3
add changelog
tfussell 2df279b
remove extraneous kubebuilder comments
tfussell 01873ba
Revert "remove extraneous kubebuilder comments"
tfussell 0b523f8
Revert "remove controller-tools"
tfussell b8c9928
Revert "remove commented out gen.sh lines"
tfussell a5b1439
generate crds from crs
tfussell af2c1c8
fix tests
tfussell ab1aa9f
remove yaml comments
tfussell 265c7d9
restructure
tfussell cb00d1a
Merge branch 'generate-crds' into improve-generation
tfussell 0c29a7b
regenerate
tfussell be802e1
delete manually-created crd strings, copy in cluster-api types
tfussell 0dbf1f6
add release name validation
tfussell a76bb15
use kustomize for name validation
tfussell 13a6fe2
add validation to awsmachinedeployments
tfussell cbaace7
change cluster-api groupversion to schemegroupversion
tfussell ab796c4
generate v1 crds
tfussell d7f7c70
switch crds to v1, clean up gen.sh, separate scripts module
tfussell 8763407
Merge branch 'generate-crds' into improve-generation
tfussell f1663bb
only generate infrastructure group as v1
tfussell 1335b30
Merge branch 'generate-crds' into improve-generation
tfussell 5acb8cc
move remaining generation steps to gen.sh
tfussell 4ae1ebb
remove cluster-api for now
tfussell 8e03fa5
delete cluster-api crds
tfussell 934eeac
avoid cluster-api crds in tests
tfussell 12b3b65
fix tests on linux
tfussell 22c53c8
support v1 and v1beta1
tfussell 55c92e3
fix kinds
tfussell 613daae
fix flannel and azureconfig
tfussell 8fca2c3
use microerror
xh3b4sd 4de72a0
improve crd loading
tfussell 78d62a0
Merge branch 'improve-generation' of github.com:giantswarm/apiextensi…
tfussell 56db5bc
remove personal gitignore entry
tfussell d78aba9
move pkged.go to pkg/crd, fix gen.sh flags
tfussell c4f2744
add circleci check, fix awscluster objectmeta comment
tfussell 028f9c6
work on ci
tfussell aebda0a
fmt
tfussell 90d0f67
test validation failure
tfussell 791459c
revert test failure
tfussell c6c8385
mention unit tests in pr template
tfussell 9be30f7
address comments
tfussell 1273b95
address comments
tfussell d0d1378
set default=false for useAlikeInstanceTypes
xh3b4sd 83eb2b8
generate CRDs
xh3b4sd bbd1e6a
make instanceDistribution optional
xh3b4sd 5573650
make status optional
xh3b4sd f65a06b
make all statuses optional to fix CR creation
xh3b4sd e0a1873
add periods
tfussell 3cf8d9e
Merge branch 'improve-generation' of github.com:giantswarm/apiextensi…
tfussell a5d98d0
fix previous merge
tfussell bf0ecaa
Merge branch 'master' into generate-crds
tfussell 373255a
make new VPC ID field optional
xh3b4sd acf9cc9
Merge branch 'improve-generation' of https://github.com/giantswarm/ap…
xh3b4sd 84f160d
specify number type for kvmconfig quantity fields
tfussell 33fbb74
Merge branch 'master' into improve-generation
teemow 5daf849
Merge branch 'generate-crds' into improve-generation
teemow 121ee0e
Add pods fields to AWSCluster (#413)
paurosello 643ae04
fix tests
teemow 20ffbe7
Add status subresource
paurosello c2ddefa
go mod tidy
teemow 8ac13cf
Merge branch 'improve-generation' of github.com:giantswarm/apiextensi…
paurosello b91ebeb
fix tests
teemow c321445
Merge branch 'improve-generation' of github.com:giantswarm/apiextensi…
paurosello a2152d0
Update subresource
paurosello 27dbcf6
add status sub resources everywhere
xh3b4sd 03c9721
drop validate job
xh3b4sd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| scripts/bin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| package apiextensions | ||
|
|
||
| // This root package is currently required for pkger to read child directories. | ||
| // Please do not remove. | ||
122 changes: 122 additions & 0 deletions
122
config/crd/bases/application.giantswarm.io_appcatalogs.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,122 @@ | ||
|
|
||
| --- | ||
| apiVersion: apiextensions.k8s.io/v1beta1 | ||
| kind: CustomResourceDefinition | ||
| metadata: | ||
| annotations: | ||
| controller-gen.kubebuilder.io/version: v0.2.4 | ||
| creationTimestamp: null | ||
| name: appcatalogs.application.giantswarm.io | ||
| spec: | ||
| group: application.giantswarm.io | ||
| names: | ||
| kind: AppCatalog | ||
| listKind: AppCatalogList | ||
| plural: appcatalogs | ||
| singular: appcatalog | ||
| scope: Namespaced | ||
| validation: | ||
| openAPIV3Schema: | ||
| 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: Config is the config to be applied when apps belonging | ||
| to this catalog are deployed. | ||
| properties: | ||
| configMap: | ||
| description: ConfigMap references a config map containing catalog | ||
| values that should be applied to apps in this catalog. | ||
| properties: | ||
| name: | ||
| description: Name is the name of the config map containing catalog | ||
| values to apply, e.g. app-catalog-values. | ||
| type: string | ||
| namespace: | ||
| description: Namespace is the namespace of the catalog values | ||
| config map, e.g. giantswarm. | ||
| type: string | ||
| required: | ||
| - name | ||
| - namespace | ||
| type: object | ||
| secret: | ||
| description: Secret references a secret containing catalog values | ||
| that should be applied to apps in this catalog. | ||
| properties: | ||
| name: | ||
| description: Name is the name of the secret containing catalog | ||
| values to apply, e.g. app-catalog-secret. | ||
| type: string | ||
| namespace: | ||
| description: Namespace is the namespace of the secret, e.g. | ||
| giantswarm. | ||
| type: string | ||
| required: | ||
| - name | ||
| - namespace | ||
| type: object | ||
| required: | ||
| - configMap | ||
| - secret | ||
| type: object | ||
| description: | ||
| type: string | ||
| logoURL: | ||
| description: LogoURL contains the links for logo image file for this | ||
| app catalog | ||
| type: string | ||
| storage: | ||
| description: Storage references a map containing values that should | ||
| be applied to the appcatalog. | ||
| properties: | ||
| URL: | ||
| description: URL is the link to where this AppCatalog's repository | ||
| is located e.g. https://giantswarm.github.com/app-catalog/. | ||
| type: string | ||
| type: | ||
| description: Type indicates which repository type would be used | ||
| for this AppCatalog. e.g. helm | ||
| type: string | ||
| required: | ||
| - URL | ||
| - type | ||
| type: object | ||
| title: | ||
| description: Title is the name of the app catalog for this CR e.g. Catalog | ||
| of Apps by Giant Swarm | ||
| type: string | ||
| required: | ||
| - config | ||
| - description | ||
| - logoURL | ||
| - storage | ||
| - title | ||
| type: object | ||
| required: | ||
| - metadata | ||
| - spec | ||
| type: object | ||
| version: v1alpha1 | ||
| versions: | ||
| - name: v1alpha1 | ||
| served: true | ||
| storage: true | ||
| status: | ||
| acceptedNames: | ||
| kind: "" | ||
| plural: "" | ||
| conditions: [] | ||
| storedVersions: [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,228 @@ | ||
|
|
||
| --- | ||
| apiVersion: apiextensions.k8s.io/v1beta1 | ||
| kind: CustomResourceDefinition | ||
| metadata: | ||
| annotations: | ||
| controller-gen.kubebuilder.io/version: v0.2.4 | ||
| creationTimestamp: null | ||
| name: apps.application.giantswarm.io | ||
| spec: | ||
| group: application.giantswarm.io | ||
| names: | ||
| kind: App | ||
| listKind: AppList | ||
| plural: apps | ||
| singular: app | ||
| scope: Namespaced | ||
| subresources: | ||
| status: {} | ||
| validation: | ||
| openAPIV3Schema: | ||
| 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: | ||
| catalog: | ||
| description: Catalog is the name of the app catalog this app belongs | ||
| to. e.g. giantswarm | ||
| type: string | ||
| config: | ||
| description: Config is the config to be applied when the app is deployed. | ||
| properties: | ||
| configMap: | ||
| description: ConfigMap references a config map containing values | ||
| that should be applied to the app. | ||
| properties: | ||
| name: | ||
| description: Name is the name of the config map containing app | ||
| values to apply, e.g. prometheus-values. | ||
| type: string | ||
| namespace: | ||
| description: Namespace is the namespace of the values config | ||
| map, e.g. monitoring. | ||
| type: string | ||
| required: | ||
| - name | ||
| - namespace | ||
| type: object | ||
| secret: | ||
| description: Secret references a secret containing secret values | ||
| that should be applied to the app. | ||
| properties: | ||
| name: | ||
| description: Name is the name of the secret containing app values | ||
| to apply, e.g. prometheus-secret. | ||
| type: string | ||
| namespace: | ||
| description: Namespace is the namespace of the secret, e.g. | ||
| kube-system. | ||
| type: string | ||
| required: | ||
| - name | ||
| - namespace | ||
| type: object | ||
| required: | ||
| - configMap | ||
| - secret | ||
| type: object | ||
| kubeConfig: | ||
| description: KubeConfig is the kubeconfig to connect to the cluster | ||
| when deploying the app. | ||
| properties: | ||
| context: | ||
| description: Context is the kubeconfig context. | ||
| properties: | ||
| name: | ||
| description: Name is the name of the kubeconfig context. e.g. | ||
| giantswarm-12345. | ||
| type: string | ||
| required: | ||
| - name | ||
| type: object | ||
| inCluster: | ||
| description: InCluster is a flag for whether to use InCluster credentials. | ||
| When true the context name and secret should not be set. | ||
| type: boolean | ||
| secret: | ||
| description: Secret references a secret containing the kubconfig. | ||
| properties: | ||
| name: | ||
| description: Name is the name of the secret containing the kubeconfig, | ||
| e.g. app-operator-kubeconfig. | ||
| type: string | ||
| namespace: | ||
| description: Namespace is the namespace of the secret containing | ||
| the kubeconfig, e.g. giantswarm. | ||
| type: string | ||
| required: | ||
| - name | ||
| - namespace | ||
| type: object | ||
| required: | ||
| - context | ||
| - inCluster | ||
| - secret | ||
| type: object | ||
| name: | ||
| description: Name is the name of the app to be deployed. e.g. kubernetes-prometheus | ||
| type: string | ||
| namespace: | ||
| description: Namespace is the namespace where the app should be deployed. | ||
| e.g. monitoring | ||
| type: string | ||
| userConfig: | ||
| description: UserConfig is the user config to be applied when the app | ||
| is deployed. | ||
| properties: | ||
| configMap: | ||
| description: ConfigMap references a config map containing user values | ||
| that should be applied to the app. | ||
| properties: | ||
| name: | ||
| description: Name is the name of the config map containing user | ||
| values to apply, e.g. prometheus-user-values. | ||
| type: string | ||
| namespace: | ||
| description: Namespace is the namespace of the user values config | ||
| map on the control plane, e.g. 123ab. | ||
| type: string | ||
| required: | ||
| - name | ||
| - namespace | ||
| type: object | ||
| secret: | ||
| description: Secret references a secret containing user secret values | ||
| that should be applied to the app. | ||
| properties: | ||
| name: | ||
| description: Name is the name of the secret containing user | ||
| values to apply, e.g. prometheus-user-secret. | ||
| type: string | ||
| namespace: | ||
| description: Namespace is the namespace of the secret, e.g. | ||
| kube-system. | ||
| type: string | ||
| required: | ||
| - name | ||
| - namespace | ||
| type: object | ||
| required: | ||
| - configMap | ||
| - secret | ||
| type: object | ||
| version: | ||
| description: Version is the version of the app that should be deployed. | ||
| e.g. 1.0.0 | ||
| type: string | ||
| required: | ||
| - catalog | ||
| - config | ||
| - kubeConfig | ||
| - name | ||
| - namespace | ||
| - userConfig | ||
| - version | ||
| type: object | ||
| status: | ||
| properties: | ||
| appVersion: | ||
| description: AppVersion is the value of the AppVersion field in the | ||
| Chart.yaml of the deployed app. 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 | ||
| release: | ||
| description: Release is the status of the Helm release for the deployed | ||
| app. | ||
| properties: | ||
| lastDeployed: | ||
| description: LastDeployed is the time when the app was last deployed. | ||
| format: date-time | ||
| type: string | ||
| reason: | ||
| description: Reason is the description of the last status of helm | ||
| release when the app is not installed successfully, e.g. deploy | ||
| resource already exists. | ||
| type: string | ||
| status: | ||
| description: Status is the status of the deployed app, e.g. DEPLOYED. | ||
| type: string | ||
| required: | ||
| - lastDeployed | ||
| - status | ||
| type: object | ||
| version: | ||
| description: Version is the value of the Version field in the Chart.yaml | ||
| of the deployed app. 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 | ||
| status: | ||
| acceptedNames: | ||
| kind: "" | ||
| plural: "" | ||
| conditions: [] | ||
| storedVersions: [] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it outdated?