-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add DeploymentTemplate controller for GitOps support (#8001)
# Description * Add `rad bicep generate-kubernetes-manifest` CLI * Add DeploymentTemplate controller * Add DeploymentResource controller ## Type of change <!-- Please select **one** of the following options that describes your change and delete the others. Clearly identifying the type of change you are making will help us review your PR faster, and is used in authoring release notes. If you are making a bug fix or functionality change to Radius and do not have an associated issue link please create one now. --> - This pull request adds or changes features of Radius and has an approved issue (issue link required). <!-- Please update the following to link the associated issue. This is required for some kinds of changes (see above). --> #6689 ## Contributor checklist Please verify that the PR meets the following requirements, where applicable: - [x] An overview of proposed schema changes is included in a linked GitHub issue. - [x] A design document PR is created in the [design-notes repository](https://github.com/radius-project/design-notes/), if new APIs are being introduced. - [x] If applicable, design document has been reviewed and approved by Radius maintainers/approvers. - [x] A PR for the [samples repository](https://github.com/radius-project/samples) is created, if existing samples are affected by the changes in this PR. - [x] A PR for the [documentation repository](https://github.com/radius-project/docs) is created, if the changes in this PR affect the documentation or any user facing updates are made. - [x] A PR for the [recipes repository](https://github.com/radius-project/recipes) is created, if existing recipes are affected by the changes in this PR. --------- Signed-off-by: willdavsmith <[email protected]> Signed-off-by: Will Smith <[email protected]>
- Loading branch information
1 parent
9c0a579
commit 835abb0
Showing
60 changed files
with
5,071 additions
and
173 deletions.
There are no files selected for viewing
This file contains 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 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
90 changes: 90 additions & 0 deletions
90
deploy/Chart/crds/radius/radapp.io_deploymentresources.yaml
This file contains 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,90 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.16.0 | ||
name: deploymentresources.radapp.io | ||
spec: | ||
group: radapp.io | ||
names: | ||
categories: | ||
- all | ||
- radius | ||
kind: DeploymentResource | ||
listKind: DeploymentResourceList | ||
plural: deploymentresources | ||
singular: deploymentresource | ||
scope: Namespaced | ||
versions: | ||
- additionalPrinterColumns: | ||
- description: Status of the resource | ||
jsonPath: .status.phrase | ||
name: Status | ||
type: string | ||
name: v1alpha3 | ||
schema: | ||
openAPIV3Schema: | ||
description: DeploymentResource is the Schema for the DeploymentResources | ||
API | ||
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: | ||
description: DeploymentResourceSpec defines the desired state of a DeploymentResource | ||
resource. | ||
properties: | ||
id: | ||
description: Id is the resource id of the Radius resource. | ||
type: string | ||
type: object | ||
status: | ||
description: DeploymentResourceStatus defines the observed state of a | ||
DeploymentResource resource. | ||
properties: | ||
id: | ||
description: Id is the resource id of the Radius resource. | ||
type: string | ||
observedGeneration: | ||
description: ObservedGeneration is the most recent generation observed | ||
for this DeploymentResource. | ||
format: int64 | ||
type: integer | ||
operation: | ||
description: Operation tracks the status of an in-progress provisioning | ||
operation. | ||
properties: | ||
operationKind: | ||
description: OperationKind describes the type of operation being | ||
performed. | ||
type: string | ||
resumeToken: | ||
description: ResumeToken is a token that can be used to resume | ||
an in-progress provisioning operation. | ||
type: string | ||
type: object | ||
phrase: | ||
description: Phrase indicates the current status of the Deployment | ||
Resource. | ||
type: string | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} |
106 changes: 106 additions & 0 deletions
106
deploy/Chart/crds/radius/radapp.io_deploymenttemplates.yaml
This file contains 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,106 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.16.0 | ||
name: deploymenttemplates.radapp.io | ||
spec: | ||
group: radapp.io | ||
names: | ||
categories: | ||
- all | ||
- radius | ||
kind: DeploymentTemplate | ||
listKind: DeploymentTemplateList | ||
plural: deploymenttemplates | ||
singular: deploymenttemplate | ||
scope: Namespaced | ||
versions: | ||
- additionalPrinterColumns: | ||
- description: Status of the resource | ||
jsonPath: .status.phrase | ||
name: Status | ||
type: string | ||
name: v1alpha3 | ||
schema: | ||
openAPIV3Schema: | ||
description: DeploymentTemplate is the Schema for the deploymenttemplates | ||
API | ||
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: | ||
description: DeploymentTemplateSpec defines the desired state of a DeploymentTemplate | ||
resource. | ||
properties: | ||
parameters: | ||
additionalProperties: | ||
type: string | ||
description: Parameters is the ARM JSON parameters for the template. | ||
type: object | ||
providerConfig: | ||
description: ProviderConfig specifies the scopes for resources. | ||
type: string | ||
template: | ||
description: Template is the ARM JSON manifest that defines the resources | ||
to deploy. | ||
type: string | ||
type: object | ||
status: | ||
description: DeploymentTemplateStatus defines the observed state of a | ||
DeploymentTemplate resource. | ||
properties: | ||
observedGeneration: | ||
description: ObservedGeneration is the most recent generation observed | ||
for this DeploymentTemplate. | ||
format: int64 | ||
type: integer | ||
operation: | ||
description: Operation tracks the status of an in-progress provisioning | ||
operation. | ||
properties: | ||
operationKind: | ||
description: OperationKind describes the type of operation being | ||
performed. | ||
type: string | ||
resumeToken: | ||
description: ResumeToken is a token that can be used to resume | ||
an in-progress provisioning operation. | ||
type: string | ||
type: object | ||
outputResources: | ||
description: OutputResources is a list of the resourceIDs that were | ||
created by the template on the last deployment. | ||
items: | ||
type: string | ||
type: array | ||
phrase: | ||
description: Phrase indicates the current status of the Deployment | ||
Template. | ||
type: string | ||
statusHash: | ||
description: StatusHash is a hash of the DeploymentTemplate's state | ||
(template, parameters, and provider config). | ||
type: string | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} |
This file contains 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 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 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
Oops, something went wrong.