forked from amazon-archives/aws-service-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Support For Creating ECR Repos
**Why:** * Allows a team to provision an ECR Repo via a CRD **This change addresses the need by:** * closes amazon-archives#45 Signed-off-by: Christopher Hein <[email protected]>
- Loading branch information
1 parent
e6bad3f
commit b4e9c44
Showing
4 changed files
with
98 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
AWSTemplateFormatVersion: 2010-09-09 | ||
Description: 'AWS Service Broker - Amazon SNS (qs-1nt0fs93c)' | ||
Parameters: | ||
Namespace: | ||
Description: >- | ||
This is the namespace for the Kubernetes object. | ||
Type: String | ||
ResourceVersion: | ||
Type: String | ||
Description: >- | ||
This is the resource version for the Kubernetes object. | ||
ResourceName: | ||
Description: >- | ||
This is the resource name for the Kubernetes object | ||
Type: String | ||
ClusterName: | ||
Description: >- | ||
This is the cluster name for the operator | ||
Type: String | ||
RepositoryName: | ||
Type: String | ||
Description: >- | ||
What should the ECR Repository be named | ||
Resources: | ||
ECRRepository: | ||
Type: AWS::ECR::Repository | ||
Properties: | ||
RepositoryName: !Ref RepositoryName | ||
|
||
Outputs: | ||
RepositoryName: | ||
Value: !Ref ECRRepository | ||
Description: Name of the topic |
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,4 @@ | ||
apiVersion: operator.aws/v1alpha1 | ||
kind: ECRRepository | ||
metadata: | ||
name: aws-operator |
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,55 @@ | ||
apiVersion: operator.aws/v1alpha1 | ||
kind: ModelDefinition | ||
metadata: | ||
name: ECRRepositoryResource | ||
spec: | ||
kind: ECRRepository | ||
type: Spec # can be Spec or Data | ||
queue: true | ||
useCloudFormation: true | ||
resource: | ||
name: ecrrepository | ||
plural: ecrrepositories | ||
shortNames: | ||
- name: ecr | ||
- name: repository | ||
body: | ||
schema: | ||
type: object | ||
properties: | ||
- key: repositoryName | ||
type: resourceName | ||
description: | | ||
A name for the image repository. If you don't specify a name, AWS | ||
CloudFormation generates a unique physical ID and uses that ID for | ||
the repository name. For more information, see Name Type. | ||
structKey: RepositoryName | ||
templateKey: RepositoryName | ||
# - key: lifecyclePolicy | ||
# type: string | ||
# description: | | ||
# A lifecycle policy for the repository. | ||
# structKey: LifecyclePolicy | ||
# templateKey: LifecyclePolicy | ||
# - key: repositoryPolicy | ||
# type: string | ||
# description: | | ||
# A policy that controls who has access to the repository and which | ||
# actions they can perform on it. For more information, see Amazon ECR | ||
# Repository Policies in the Amazon Elastic Container Registry User | ||
# Guide. | ||
# structKey: repositoryPolicy | ||
# templateKey: repositoryPolicy | ||
|
||
output: | ||
schema: | ||
type: object | ||
properties: | ||
- key: repositoryName | ||
type: string | ||
description: | | ||
A name for the image repository. If you don't specify a name, AWS | ||
CloudFormation generates a unique physical ID and uses that ID for | ||
the repository name. For more information, see Name Type. | ||
structKey: RepositoryName | ||
templateKey: RepositoryName |
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