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

Commit 8847d2e

Browse files
committed
generated go code
1 parent 31dd9f0 commit 8847d2e

File tree

19 files changed

+1415
-19
lines changed

19 files changed

+1415
-19
lines changed

code-generation/pkg/codegen/templates.go

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

configs/aws-service-operator.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,22 @@ items:
6868
scope: Namespaced
6969
version: v1alpha1
7070

71+
- apiVersion: apiextensions.k8s.io/v1beta1
72+
kind: CustomResourceDefinition
73+
metadata:
74+
name: elasticaches.service-operator.aws
75+
spec:
76+
group: service-operator.aws
77+
names:
78+
kind: ElastiCache
79+
listKind: ElastiCacheList
80+
plural: elasticaches
81+
shortNames:
82+
- ec
83+
singular: elasticaches
84+
scope: Namespaced
85+
version: v1alpha1
86+
7187
- apiVersion: apiextensions.k8s.io/v1beta1
7288
kind: CustomResourceDefinition
7389
metadata:
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
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+
// ElastiCache defines the base resource
13+
type ElastiCache struct {
14+
metav1.TypeMeta `json:",inline"`
15+
metav1.ObjectMeta `json:"metadata"`
16+
Spec ElastiCacheSpec `json:"spec"`
17+
Status ElastiCacheStatus `json:"status"`
18+
Output ElastiCacheOutput `json:"output"`
19+
AdditionalResources ElastiCacheAdditionalResources `json:"additionalResources"`
20+
}
21+
22+
// ElastiCacheSpec defines the Spec resource for ElastiCache
23+
type ElastiCacheSpec struct {
24+
CloudFormationTemplateName string `json:"cloudFormationTemplateName"`
25+
CloudFormationTemplateNamespace string `json:"cloudFormationTemplateNamespace"`
26+
RollbackCount int `json:"rollbackCount"`
27+
AutoMinorVersionUpgrade bool `json:"AutoMinorVersionUpgrade"`
28+
AZMode string `json:"AZMode"`
29+
CacheNodeType string `json:"CacheNodeType"`
30+
CacheParameterGroupName string `json:"CacheParameterGroupName"`
31+
CacheSubnetGroupName string `json:"CacheSubnetGroupName"`
32+
Engine string `json:"Engine"`
33+
EngineVersion string `json:"EngineVersion"`
34+
NotificationTopicArn string `json:"NotificationTopicArn"`
35+
NumCacheNodes int `json:"NumCacheNodes"`
36+
Port int `json:"Port"`
37+
PreferredMaintenanceWindow string `json:"PreferredMaintenanceWindow"`
38+
PreferredAvailabilityZone string `json:"PreferredAvailabilityZone"`
39+
PreferredAvailabilityZones string `json:"PreferredAvailabilityZones"`
40+
SnapshotWindow string `json:"SnapshotWindow"`
41+
VpcSecurityGroupIds string `json:"VpcSecurityGroupIds"`
42+
}
43+
44+
// ElastiCacheOutput defines the output resource for ElastiCache
45+
type ElastiCacheOutput struct {
46+
RedisEndpointAddress string `json:"RedisEndpointAddress"`
47+
RedisEndpointPort string `json:"RedisEndpointPort"`
48+
ConfigurationEndpointAddress string `json:"ConfigurationEndpoint"`
49+
ConfigurationEndpointPort string `json:"ConfigurationEndpointPort"`
50+
}
51+
52+
// ElastiCacheStatus holds the status of the Cloudformation template
53+
type ElastiCacheStatus struct {
54+
ResourceStatus string `json:"resourceStatus"`
55+
ResourceStatusReason string `json:"resourceStatusReason"`
56+
StackID string `json:"stackID"`
57+
}
58+
59+
// ElastiCacheAdditionalResources holds the additional resources
60+
type ElastiCacheAdditionalResources struct {
61+
Services []string `json:"services"`
62+
}
63+
64+
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
65+
66+
// ElastiCacheList defines the list attribute for the ElastiCache type
67+
type ElastiCacheList struct {
68+
metav1.TypeMeta `json:",inline"`
69+
metav1.ListMeta `json:"metadata"`
70+
Items []ElastiCache `json:"items"`
71+
}
72+
73+
func init() {
74+
localSchemeBuilder.Register(addElastiCacheTypes)
75+
}
76+
77+
func addElastiCacheTypes(scheme *runtime.Scheme) error {
78+
scheme.AddKnownTypes(SchemeGroupVersion,
79+
&ElastiCache{},
80+
&ElastiCacheList{},
81+
)
82+
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
83+
return nil
84+
}

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

Lines changed: 132 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)