Skip to content
This repository was archived by the owner on Nov 7, 2019. It is now read-only.

Commit 1bfa2b8

Browse files
Adding Generated Code for SNS Subscriptions
Signed-off-by: Christopher Hein <[email protected]>
1 parent e8e0d9a commit 1bfa2b8

File tree

33 files changed

+2124
-227
lines changed

33 files changed

+2124
-227
lines changed

pkg/apis/operator.aws/v1alpha1/cloudformationtemplate.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ type CloudFormationTemplate struct {
2222
type CloudFormationTemplateData struct {
2323
CloudFormationTemplateName string `json:"cloudFormationTemplateName"`
2424
CloudFormationTemplateNamespace string `json:"cloudFormationTemplateNamespace"`
25+
RollbackCount int `json:"rollbackCount"`
2526
Key string `json:"key"`
2627
Template string `json:"template"`
2728
}

pkg/apis/operator.aws/v1alpha1/dynamodb.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ type DynamoDBRangeAttribute struct {
3434
type DynamoDBSpec struct {
3535
CloudFormationTemplateName string `json:"cloudFormationTemplateName"`
3636
CloudFormationTemplateNamespace string `json:"cloudFormationTemplateNamespace"`
37+
RollbackCount int `json:"rollbackCount"`
3738
RangeAttribute DynamoDBRangeAttribute `json:"rangeAttribute"`
3839
ReadCapacityUnits int `json:"readCapacityUnits"`
3940
WriteCapacityUnits int `json:"writeCapacityUnits"`

pkg/apis/operator.aws/v1alpha1/ecrrepository.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ type ECRRepository struct {
2222
type ECRRepositorySpec struct {
2323
CloudFormationTemplateName string `json:"cloudFormationTemplateName"`
2424
CloudFormationTemplateNamespace string `json:"cloudFormationTemplateNamespace"`
25+
RollbackCount int `json:"rollbackCount"`
2526
}
2627

2728

pkg/apis/operator.aws/v1alpha1/s3bucket.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ type S3BucketLogging struct {
2828
type S3BucketSpec struct {
2929
CloudFormationTemplateName string `json:"cloudFormationTemplateName"`
3030
CloudFormationTemplateNamespace string `json:"cloudFormationTemplateNamespace"`
31+
RollbackCount int `json:"rollbackCount"`
3132
Versioning bool `json:"versioning"`
33+
AccessControl string `json:"accessControl"`
3234
Logging S3BucketLogging `json:"logging"`
3335
}
3436

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
package v1alpha1
2+
3+
import (
4+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
5+
"k8s.io/apimachinery/pkg/runtime"
6+
)
7+
8+
// +genclient
9+
// +genclient:noStatus
10+
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
11+
12+
// SNSSubscription defines the base resource
13+
type SNSSubscription struct {
14+
metav1.TypeMeta `json:",inline"`
15+
metav1.ObjectMeta `json:"metadata"`
16+
Spec SNSSubscriptionSpec `json:"spec"`
17+
Status SNSSubscriptionStatus `json:"status"`
18+
Output SNSSubscriptionOutput `json:"output"`
19+
AdditionalResources SNSSubscriptionAdditionalResources `json:"additionalResources"`
20+
}
21+
// SNSSubscriptionSpec defines the Spec resource for SNSSubscription
22+
type SNSSubscriptionSpec struct {
23+
CloudFormationTemplateName string `json:"cloudFormationTemplateName"`
24+
CloudFormationTemplateNamespace string `json:"cloudFormationTemplateNamespace"`
25+
RollbackCount int `json:"rollbackCount"`
26+
TopicName string `json:"topicName"`
27+
Protocol string `json:"protocol"`
28+
Endpoint string `json:"endpoint"`
29+
QueueURL string `json:"queueURL"`
30+
}
31+
32+
33+
// SNSSubscriptionOutput defines the output resource for SNSSubscription
34+
type SNSSubscriptionOutput struct {
35+
SubscriptionARN string `json:"subscriptionARN"`
36+
}
37+
38+
// SNSSubscriptionStatus holds the status of the Cloudformation template
39+
type SNSSubscriptionStatus struct {
40+
ResourceStatus string `json:"resourceStatus"`
41+
ResourceStatusReason string `json:"resourceStatusReason"`
42+
StackID string `json:"stackID"`
43+
}
44+
45+
// SNSSubscriptionAdditionalResources holds the additional resources
46+
type SNSSubscriptionAdditionalResources struct {
47+
}
48+
49+
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
50+
51+
// SNSSubscriptionList defines the list attribute for the SNSSubscription type
52+
type SNSSubscriptionList struct {
53+
metav1.TypeMeta `json:",inline"`
54+
metav1.ListMeta `json:"metadata"`
55+
Items []SNSSubscription `json:"items"`
56+
}
57+
58+
func init() {
59+
localSchemeBuilder.Register(addSNSSubscriptionTypes)
60+
}
61+
62+
func addSNSSubscriptionTypes(scheme *runtime.Scheme) error {
63+
scheme.AddKnownTypes(SchemeGroupVersion,
64+
&SNSSubscription{},
65+
&SNSSubscriptionList{},
66+
)
67+
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
68+
return nil
69+
}

pkg/apis/operator.aws/v1alpha1/snstopic.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ type SNSTopic struct {
2121
type SNSTopicSpec struct {
2222
CloudFormationTemplateName string `json:"cloudFormationTemplateName"`
2323
CloudFormationTemplateNamespace string `json:"cloudFormationTemplateNamespace"`
24+
RollbackCount int `json:"rollbackCount"`
2425
}
2526

2627
// SNSTopicOutput defines the output resource for SNSTopic
2728
type SNSTopicOutput struct {
28-
TopicName string `json:"topicName"`
29+
TopicARN string `json:"topicARN"`
2930
}
3031

3132
// SNSTopicStatus holds the status of the Cloudformation template

pkg/apis/operator.aws/v1alpha1/sqsqueue.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ type SQSQueue struct {
2222
type SQSQueueSpec struct {
2323
CloudFormationTemplateName string `json:"cloudFormationTemplateName"`
2424
CloudFormationTemplateNamespace string `json:"cloudFormationTemplateNamespace"`
25+
RollbackCount int `json:"rollbackCount"`
2526
ContentBasedDeduplication bool `json:"contentBasedDeduplication"`
2627
DelaySeconds int `json:"delaySeconds"`
2728
MaximumMessageSize int `json:"maximumMessageSize"`

pkg/apis/operator.aws/v1alpha1/zz_generated.deepcopy.go

Lines changed: 127 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/client/clientset/versioned/typed/operator.aws/v1alpha1/fake/fake_operator.aws_client.go

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/client/clientset/versioned/typed/operator.aws/v1alpha1/fake/fake_snssubscription.go

Lines changed: 128 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)