Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Commit

Permalink
updated ofr new parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
troy-ameigh committed Jul 2, 2021
1 parent 5eda60f commit 5591d32
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 47 deletions.
56 changes: 21 additions & 35 deletions samples/eks-app-helm-deploy/helm3-wordpress-deploy-RDS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ Metadata:
- Label:
default: Kube Cluster
Parameters:
- KubeClusterName
- KubeGetLambdaArn
- KubeConfigKmsContext
- ClusterName
- Namespace
- Name
- Label:
Expand All @@ -34,12 +32,8 @@ Metadata:
default: Wordpress Username
wordpressPassword:
default: Wordpress Password
KubeClusterName:
ClusterName:
default: EKS Kube Cluster Name
KubeGetLambdaArn:
default: Kube Get Lambda ARN
KubeConfigKmsContext:
default: Kube KMS Context
Namespace:
default: Kube Namespace for this function
Name:
Expand All @@ -61,7 +55,7 @@ Metadata:
BastionSecurityGroupId:
default: Bastion SecurityGroup ID
Parameters:
wordpressUsername:
wordpressUsername:
AllowedPattern: ^[a-z][a-z0-9_]*$
ConstraintDescription: User name parameter must be lowercase, begin with a letter,
contain only alphanumeric characters or underscores, and be less than 60 characters.
Expand All @@ -72,38 +66,30 @@ Parameters:
MaxLength: '60'
MinLength: '1'
Type: String
wordpressPassword:
wordpressPassword:
Description: 'The password that is associated with the master user account for
Wordpress. The password must contain 8 to 64 printable ASCII
characters, excluding: /, ", \'', \ and @. It must contain one uppercase letter,
one lowercase letter, and one number.'
MaxLength: '64'
NoEcho: 'true'
Type: String
KubeClusterName:
ClusterName:
Description: 'Use the "EKSClusterName" from the EKSStack outputs section in CloudFormation.'
Type: String
KubeGetLambdaArn:
Description: 'Get this from the EKSStack outputs section in CloudFormation.'
Type: String
KubeConfigKmsContext:
Description: 'This is using the default from the AWS EKS Quick Start, if you modified
this context when deploying. You need to use the modified KMS context here.'
Type: String
Default: "EKSQuickStart"
Namespace:
Namespace:
Description: 'Modify to use a custom Namespace. The Namespace up to 63 characters
long. The characters allowed in names are: digits (0-9), lower case letters (a-z),
and underscore(s)(cannot start or end with)'
Type: String
Default: "example-helm-rds"
Name:
Name:
Description: 'Modify to use a custom Names. The Names up to 253 characters
long. The characters allowed in names are: digits (0-9), lower case letters (a-z), -,
and ..'
Type: String
Default: "myrelease-rds"
DBMasterUsername:
DBMasterUsername:
AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
ConstraintDescription: must begin with a letter and contain only alphanumeric characters.
Default: mariadb
Expand All @@ -112,35 +98,35 @@ Parameters:
MinLength: '1'
NoEcho: 'true'
Type: String
DBMasterUserPassword:
DBMasterUserPassword:
AllowedPattern: '(?=^.{6,255}$)((?=.*\\d)(?=.*[A-Z])(?=.*[a-z])|(?=.*\\d)(?=.*[^A-Za-z0-9])(?=.*[a-z])|(?=.*[^A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z])|(?=.*\\d)(?=.*[A-Z])(?=.*[^A-Za-z0-9]))^.*'
ConstraintDescription: "Min 8 chars. Must include 1 uppercase, 1 lowercase, 1 number, 1 (non / @ \" ') symbol"
Description: "Password for the master ('mariadb') account. Password must meeting the following: Min 8 chars. Must include 1 uppercase, 1 lowercase, 1 number, 1 (non / @ \" ') symbol."
MinLength: 8
MaxLength: 128
NoEcho: true
Type: String
DBName:
DBName:
AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
ConstraintDescription: must begin with a letter and contain only alphanumeric characters. Cannot be longer than 64 charcters.
Default: wordpress
Description: "The database name to create."
MaxLength: '64'
MinLength: '1'
Type: String
Subnet1ID:
Subnet1ID:
Description: 'Get Private Subnet 1 ID from the VPCStack outputs section in CloudFormation.'
Type: AWS::EC2::Subnet::Id
Subnet2ID:
Subnet2ID:
Description: 'Get Private Subnet 2 ID from the VPCStack outputs section in CloudFormation.'
Type: AWS::EC2::Subnet::Id
NodeGroupSecurityGroupId:
NodeGroupSecurityGroupId:
Description: 'Get NodeGroupSecurityGroupId from the EKSStack outputs section in CloudFormation.'
Type: String
BastionSecurityGroupId:
BastionSecurityGroupId:
Description: 'Get BastionSecurityGroupId from the EKSStack outputs section in CloudFormation.'
Type: String
VPCID:
VPCID:
Type: AWS::EC2::VPC::Id
Description: 'Get VCP ID from the VPCStack outputs section in CloudFormation.'

Expand Down Expand Up @@ -199,8 +185,7 @@ Resources:
HelmExample:
Type: "AWSQS::Kubernetes::Helm"
Properties:
ClusterID: !Ref KubeClusterName
KubeConfigKmsContext: !Ref KubeConfigKmsContext
ClusterID: !Ref ClusterName
Namespace: !Ref Namespace
Chart: stable/wordpress
Name: !Ref Name
Expand All @@ -218,13 +203,14 @@ Resources:
Type: "Custom::KubeGet"
Version: '1.0'
Properties:
ServiceToken: !Ref KubeGetLambdaArn
ClusterName: !Ref KubeClusterName
KubeConfigKmsContext: !Ref KubeConfigKmsContext
ServiceToken: !Sub "arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:function:EKS-QuickStart-KubeGet-${ClusterName}"
ClusterName: !Ref ClusterName
Namespace: !Ref Namespace
Name: !Sub 'service/${Name}-wordpress'
JsonPath: '{.status.loadBalancer.ingress[0].hostname}'

Outputs:
WPElbHostName:
Value: !Ref WPElbHostName
Value: !Ref WPElbHostName
RDSDBEndpoint:
Value: !GetAtt WPDB.Endpoint.Address
18 changes: 6 additions & 12 deletions samples/eks-app-helm-deploy/helm3-wordpress-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ Metadata:
- Label:
default: Kube Cluster
Parameters:
- KubeClusterName
- KubeGetLambdaArn
- ClusterName
- KubeConfigKmsContext
- Namespace
- Name
Expand All @@ -23,10 +22,8 @@ Metadata:
default: Wordpress Username
wordpressPassword:
default: Wordpress Password
KubeClusterName:
ClusterName:
default: EKS Kube Cluster Name
KubeGetLambdaArn:
default: Kube Get Lambda ARN
KubeConfigKmsContext:
default: Kube KMS Context
Namespace:
Expand All @@ -53,12 +50,9 @@ Parameters:
MaxLength: '64'
NoEcho: 'true'
Type: String
KubeClusterName:
ClusterName:
Description: 'Use the "EKSClusterName" from the EKSStack outputs section in CloudFormation.'
Type: String
KubeGetLambdaArn:
Description: 'Get this from the EKSStack outputs section in CloudFormation.'
Type: String
KubeConfigKmsContext:
Description: 'This is using the default from the AWS EKS Quick Start, if you modified
this context when deploying. You need to use the modified KMS context here.'
Expand All @@ -80,7 +74,7 @@ Resources:
HelmExample:
Type: "AWSQS::Kubernetes::Helm"
Properties:
ClusterID: !Ref KubeClusterName
ClusterID: !Ref ClusterName
KubeConfigKmsContext: !Ref KubeConfigKmsContext
Namespace: !Ref Namespace
Chart: stable/wordpress
Expand All @@ -93,8 +87,8 @@ Resources:
Type: "Custom::KubeGet"
Version: '1.0'
Properties:
ServiceToken: !Ref KubeGetLambdaArn
ClusterName: !Ref KubeClusterName
ServiceToken: !Sub "arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:function:EKS-QuickStart-KubeGet-${ClusterName}"
ClusterName: !Ref ClusterName
KubeConfigKmsContext: !Ref KubeConfigKmsContext
Namespace: !Ref Namespace
Name: !Sub 'service/${Name}-wordpress'
Expand Down

0 comments on commit 5591d32

Please sign in to comment.