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

Commit

Permalink
Merge pull request #65 from aws-quickstart/gargana_blog_assets
Browse files Browse the repository at this point in the history
Small revision for blog assets.
  • Loading branch information
gargana authored Oct 19, 2022
2 parents 38738b3 + e2fb0d1 commit b1cdf83
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Parameters:
Type: String
JobName:
Type: String
Default: 'job-example'
Default: 'example-job'
AvailabilityZones:
Description: List of Availability Zones to use for the subnets in the VPC. Three
Availability Zones are used for this deployment.
Expand Down Expand Up @@ -38,12 +38,6 @@ Resources:
NodeInstanceType: t3.large
NumberOfNodes: 1
MaxNumberOfNodes: 1
GetOIDCProvider:
Type: Custom::GetOIDCProvider
Properties:
ServiceToken: !Sub "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:eks-quickstart-ResourceReader"
AwsCliCommand: !Sub "eks describe-cluster --name ${EKSStack.Outputs.EKSClusterName} --query 'cluster.identity.oidc.{issuer:issuer}'"
IdField: 'issuer'
PreworkStack:
Type: AWS::CloudFormation::Stack
Properties:
Expand All @@ -54,11 +48,6 @@ Resources:
PreworkScriptObject: !Ref PreworkScriptObject
JobName: !Ref JobName
KubernetesNameSpace: "prework-example"
OIDCProvider: !Sub
- "${OIDCProvider1}/${OIDCProvider2}/${OIDCProvider3}"
- OIDCProvider1: !Select [ 2, !Split [ "/", !Ref GetOIDCProvider ] ]
OIDCProvider2: !Select [ 3, !Split [ "/", !Ref GetOIDCProvider ] ]
OIDCProvider3: !Select [ 4, !Split [ "/", !Ref GetOIDCProvider ] ]
Outputs:
EKSClusterName:
Value: !GetAtt EKSStack.Outputs.EKSClusterName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Parameters:
Default: "quickstart-examples/samples/eks-cluster-prework/scripts/pw-script.sh"
JobName:
Type: String
Default: job-example
Default: example-job
AllowedPattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'
ConstraintDescription: "a lowercase RFC 1123 subdomain must consist of lower case
alphanumeric characters, '-' or '.', and must start and end with an alphanumeric
Expand Down Expand Up @@ -45,6 +45,7 @@ Resources:
}
- NameSpace: !Ref KubernetesNameSpace
ResourceName: !Sub "pw-service-account-${JobName}"
OIDCProvider: !Join [ '', !Split [ 'https://', !Ref 'GetOIDCProvider' ] ]
Path: "/"
Policies:
- PolicyName: root
Expand Down Expand Up @@ -166,8 +167,6 @@ Resources:
args:
- >
sleep 15;
yum update -y;
yum install -y awscli;
export AWS_REGION=${AWS::Region};
export NS=${NameSpace};
aws sts get-caller-identity;
Expand All @@ -186,4 +185,4 @@ Resources:
backoffLimit: 4
- ResourceName: !Sub "pw-job-${JobName}"
NameSpace: !Ref "KubernetesNameSpace"
S3ScriptURL: !Sub "s3://${PreworkScriptBucket}/${PreworkScriptObject}"
S3ScriptURL: !Sub "s3://${PreworkScriptBucket}/${PreworkScriptObject}"

0 comments on commit b1cdf83

Please sign in to comment.