Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ go run cmd/ack-generate/main.go types < /tmp/eks.swagger.yaml
- // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
- //
- // Licensed under the Apache License, Version 2.0 (the "License"). You may
- // not use this file except in compliance with the License. A copy of the
- // License is located at
- //
- // http://aws.amazon.com/apache2.0/
- //
- // or in the "license" file accompanying this file. This file is distributed
- // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- // express or implied. See the License for the specific language governing
- // permissions and limitations under the License.
- package v1alpha1
- import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- )
- type UpdateParam struct {
- Type string `json:"type,omitempty"`
- Value string `json:"value,omitempty"`
- }
- type LogSetup struct {
- Enabled bool `json:"enabled,omitempty"`
- Types []string `json:"types,omitempty"`
- }
- type NodegroupHealth struct {
- Issues []*Issues `json:"issues,omitempty"`
- }
- type EncryptionConfig struct {
- Provider *Provider `json:"provider,omitempty"`
- Resources []string `json:"resources,omitempty"`
- }
- type OIDC struct {
- Issuer string `json:"issuer,omitempty"`
- }
- type VpcConfigRequest struct {
- EndpointPrivateAccess bool `json:"endpointPrivateAccess,omitempty"`
- EndpointPublicAccess bool `json:"endpointPublicAccess,omitempty"`
- PublicAccessCidrs []string `json:"publicAccessCidrs,omitempty"`
- SecurityGroupIds []string `json:"securityGroupIds,omitempty"`
- SubnetIds []string `json:"subnetIds,omitempty"`
- }
- type FargateProfileSelector struct {
- Labels map[string]string `json:"labels,omitempty"`
- Namespace string `json:"namespace,omitempty"`
- }
- type Provider struct {
- KeyArn string `json:"keyArn,omitempty"`
- }
- type NodegroupResources struct {
- AutoScalingGroups []*AutoScalingGroups `json:"autoScalingGroups,omitempty"`
- RemoteAccessSecurityGroup string `json:"remoteAccessSecurityGroup,omitempty"`
- }
- type RemoteAccessConfig struct {
- Ec2SshKey string `json:"ec2SshKey,omitempty"`
- SourceSecurityGroups []string `json:"sourceSecurityGroups,omitempty"`
- }
- type AutoScalingGroup struct {
- Name string `json:"name,omitempty"`
- }
- type NodegroupScalingConfig struct {
- DesiredSize int64 `json:"desiredSize,omitempty"`
- MaxSize int64 `json:"maxSize,omitempty"`
- MinSize int64 `json:"minSize,omitempty"`
- }
- type UpdateLabelsPayload struct {
- AddOrUpdateLabels map[string]string `json:"addOrUpdateLabels,omitempty"`
- RemoveLabels []string `json:"removeLabels,omitempty"`
- }
- type Update struct {
- CreatedAt string `json:"createdAt,omitempty"`
- Errors []*Errors `json:"errors,omitempty"`
- Id string `json:"id,omitempty"`
- Params []*Params `json:"params,omitempty"`
- Status string `json:"status,omitempty"`
- Type string `json:"type,omitempty"`
- }
- type Logging struct {
- ClusterLogging []*ClusterLogging `json:"clusterLogging,omitempty"`
- }
- type Identity struct {
- Oidc *Oidc `json:"oidc,omitempty"`
- }
- type VpcConfigResponse struct {
- ClusterSecurityGroupId string `json:"clusterSecurityGroupId,omitempty"`
- EndpointPrivateAccess bool `json:"endpointPrivateAccess,omitempty"`
- EndpointPublicAccess bool `json:"endpointPublicAccess,omitempty"`
- PublicAccessCidrs []string `json:"publicAccessCidrs,omitempty"`
- SecurityGroupIds []string `json:"securityGroupIds,omitempty"`
- SubnetIds []string `json:"subnetIds,omitempty"`
- VpcId string `json:"vpcId,omitempty"`
- }
- type Certificate struct {
- Data string `json:"data,omitempty"`
- }
- type Issue struct {
- Code string `json:"code,omitempty"`
- Message string `json:"message,omitempty"`
- ResourceIds []string `json:"resourceIds,omitempty"`
- }
- // ClusterSpec defines the desired state of Cluster
- type ClusterSpec struct {
- // The Arn attr is on all AWS service API CRs. It represents the Amazon
- // Resource Name for the object. CRs of this Kind that are created without
- // an Arn attr will be created by the controller. CRs of this Kind that
- // are created with a non-nil Arn attr are considered by the controller to
- // already exist in the backend AWS service API.
- Arn string `json:"arn,omitempty"`
- ClientRequestToken string `json:"clientRequestToken,omitempty"`
- EncryptionConfig []*EncryptionConfig `json:"encryptionConfig,omitempty"`
- Logging *Logging `json:"logging,omitempty"`
- Name string `json:"name,omitempty"`
- ResourcesVpcConfig *ResourcesVpcConfig `json:"resourcesVpcConfig,omitempty"`
- RoleArn string `json:"roleArn,omitempty"`
- Tags map[string]string `json:"tags,omitempty"`
- Version string `json:"version,omitempty"`
- }
- // ClusterStatus defines the observed state of Cluster
- type ClusterStatus struct {
- Arn string `json:"arn,omitempty"`
- CertificateAuthority *CertificateAuthority `json:"certificateAuthority,omitempty"`
- ClientRequestToken string `json:"clientRequestToken,omitempty"`
- CreatedAt string `json:"createdAt,omitempty"`
- EncryptionConfig []*EncryptionConfig `json:"encryptionConfig,omitempty"`
- Endpoint string `json:"endpoint,omitempty"`
- Identity *Identity `json:"identity,omitempty"`
- Logging *Logging `json:"logging,omitempty"`
- Name string `json:"name,omitempty"`
- PlatformVersion string `json:"platformVersion,omitempty"`
- ResourcesVpcConfig *ResourcesVpcConfig `json:"resourcesVpcConfig,omitempty"`
- RoleArn string `json:"roleArn,omitempty"`
- Status string `json:"status,omitempty"`
- Tags map[string]string `json:"tags,omitempty"`
- Version string `json:"version,omitempty"`
- }
- // Cluster is the Schema for the Clusters API
- type Cluster struct {
- metav1.TypeMeta `json:",inline"`
- metav1.ObjectMeta `json:"metadata,omitempty"`
- Spec ClusterSpec `json:"spec,omitempty"`
- Status ClusterStatus `json:"status,omitempty"`
- }
- // ClusterList contains a list of Cluster
- type ClusterList struct {
- metav1.TypeMeta `json:",inline"`
- metav1.ListMeta `json:"metadata,omitempty"`
- Items []Cluster `json:"items"`
- }
- // NodegroupSpec defines the desired state of Nodegroup
- type NodegroupSpec struct {
- // The Arn attr is on all AWS service API CRs. It represents the Amazon
- // Resource Name for the object. CRs of this Kind that are created without
- // an Arn attr will be created by the controller. CRs of this Kind that
- // are created with a non-nil Arn attr are considered by the controller to
- // already exist in the backend AWS service API.
- Arn string `json:"arn,omitempty"`
- AmiType string `json:"amiType,omitempty"`
- ClientRequestToken string `json:"clientRequestToken,omitempty"`
- ClusterName string `json:"clusterName,omitempty"`
- DiskSize int64 `json:"diskSize,omitempty"`
- InstanceTypes []string `json:"instanceTypes,omitempty"`
- Labels map[string]string `json:"labels,omitempty"`
- NodeRole string `json:"nodeRole,omitempty"`
- NodegroupName string `json:"nodegroupName,omitempty"`
- ReleaseVersion string `json:"releaseVersion,omitempty"`
- RemoteAccess *RemoteAccess `json:"remoteAccess,omitempty"`
- ScalingConfig *ScalingConfig `json:"scalingConfig,omitempty"`
- Subnets []string `json:"subnets,omitempty"`
- Tags map[string]string `json:"tags,omitempty"`
- Version string `json:"version,omitempty"`
- }
- // NodegroupStatus defines the observed state of Nodegroup
- type NodegroupStatus struct {
- AmiType string `json:"amiType,omitempty"`
- ClusterName string `json:"clusterName,omitempty"`
- CreatedAt string `json:"createdAt,omitempty"`
- DiskSize int64 `json:"diskSize,omitempty"`
- Health *Health `json:"health,omitempty"`
- InstanceTypes []string `json:"instanceTypes,omitempty"`
- Labels map[string]string `json:"labels,omitempty"`
- ModifiedAt string `json:"modifiedAt,omitempty"`
- NodeRole string `json:"nodeRole,omitempty"`
- NodegroupArn string `json:"nodegroupArn,omitempty"`
- NodegroupName string `json:"nodegroupName,omitempty"`
- ReleaseVersion string `json:"releaseVersion,omitempty"`
- RemoteAccess *RemoteAccess `json:"remoteAccess,omitempty"`
- Resources *Resources `json:"resources,omitempty"`
- ScalingConfig *ScalingConfig `json:"scalingConfig,omitempty"`
- Status string `json:"status,omitempty"`
- Subnets []string `json:"subnets,omitempty"`
- Tags map[string]string `json:"tags,omitempty"`
- Version string `json:"version,omitempty"`
- }
- // Nodegroup is the Schema for the Nodegroups API
- type Nodegroup struct {
- metav1.TypeMeta `json:",inline"`
- metav1.ObjectMeta `json:"metadata,omitempty"`
- Spec NodegroupSpec `json:"spec,omitempty"`
- Status NodegroupStatus `json:"status,omitempty"`
- }
- // NodegroupList contains a list of Nodegroup
- type NodegroupList struct {
- metav1.TypeMeta `json:",inline"`
- metav1.ListMeta `json:"metadata,omitempty"`
- Items []Nodegroup `json:"items"`
- }
- // FargateProfileSpec defines the desired state of FargateProfile
- type FargateProfileSpec struct {
- // The Arn attr is on all AWS service API CRs. It represents the Amazon
- // Resource Name for the object. CRs of this Kind that are created without
- // an Arn attr will be created by the controller. CRs of this Kind that
- // are created with a non-nil Arn attr are considered by the controller to
- // already exist in the backend AWS service API.
- Arn string `json:"arn,omitempty"`
- ClientRequestToken string `json:"clientRequestToken,omitempty"`
- ClusterName string `json:"clusterName,omitempty"`
- FargateProfileName string `json:"fargateProfileName,omitempty"`
- PodExecutionRoleArn string `json:"podExecutionRoleArn,omitempty"`
- Selectors []*Selectors `json:"selectors,omitempty"`
- Subnets []string `json:"subnets,omitempty"`
- Tags map[string]string `json:"tags,omitempty"`
- }
- // FargateProfileStatus defines the observed state of FargateProfile
- type FargateProfileStatus struct {
- ClusterName string `json:"clusterName,omitempty"`
- CreatedAt string `json:"createdAt,omitempty"`
- FargateProfileArn string `json:"fargateProfileArn,omitempty"`
- FargateProfileName string `json:"fargateProfileName,omitempty"`
- PodExecutionRoleArn string `json:"podExecutionRoleArn,omitempty"`
- Selectors []*Selectors `json:"selectors,omitempty"`
- Status string `json:"status,omitempty"`
- Subnets []string `json:"subnets,omitempty"`
- Tags map[string]string `json:"tags,omitempty"`
- }
- // FargateProfile is the Schema for the FargateProfiles API
- type FargateProfile struct {
- metav1.TypeMeta `json:",inline"`
- metav1.ObjectMeta `json:"metadata,omitempty"`
- Spec FargateProfileSpec `json:"spec,omitempty"`
- Status FargateProfileStatus `json:"status,omitempty"`
- }
- // FargateProfileList contains a list of FargateProfile
- type FargateProfileList struct {
- metav1.TypeMeta `json:",inline"`
- metav1.ListMeta `json:"metadata,omitempty"`
- Items []FargateProfile `json:"items"`
- }
- func init() {
- SchemeBuilder.Register(&Cluster{}, &ClusterList{})
- SchemeBuilder.Register(&Nodegroup{}, &NodegroupList{})
- SchemeBuilder.Register(&FargateProfile{}, &FargateProfileList{})
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement