Skip to content

Commit

Permalink
Add default storage class. Fixes #80
Browse files Browse the repository at this point in the history
  • Loading branch information
rosskukulinski committed Oct 7, 2017
1 parent 58d910b commit 6320009
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/default.storageclass.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: storage.k8s.io/v1beta1
kind: StorageClass
metadata:
name: gp2
annotations:
storageclass.beta.kubernetes.io/is-default-class: "true"
provisioner: kubernetes.io/aws-ebs
parameters:
type: gp2
4 changes: 4 additions & 0 deletions scripts/setup-k8s-master.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ test -n "{{LoadBalancerName}}"
test -n "{{ClusterToken}}"
test -n "{{NetworkingProviderUrl}}"
test -n "{{DashboardUrl}}"
test -n "{{StorageClassUrl}}"
test -n "{{Region}}"

# kubeadm wants lowercase for DNS (as it probably should)
Expand Down Expand Up @@ -68,6 +69,9 @@ kubectl apply -f {{NetworkingProviderUrl}}
# Install the kubernetes dashboard by default
kubectl apply -f {{DashboardUrl}}

# Install the default StorageClass
kubectl apply -f {{StorageClassUrl}}

INSTANCE_ID=$(ec2metadata --instance-id)
# Add this machine (master) to the load balancer for external access
aws elb register-instances-with-load-balancer \
Expand Down
1 change: 1 addition & 0 deletions templates/kubernetes-cluster.template
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ Resources:
ClusterToken: !GetAtt KubeadmToken.Token
NetworkingProviderUrl: !Sub "https://${QSS3BucketName}.s3.amazonaws.com/${QSS3KeyPrefix}/scripts/${NetworkingProvider}.yaml"
DashboardUrl: !Sub "https://${QSS3BucketName}.s3.amazonaws.com/${QSS3KeyPrefix}/scripts/dashboard.yaml"
StorageClassUrl: !Sub "https://${QSS3BucketName}.s3.amazonaws.com/${QSS3KeyPrefix}/scripts/default.storageclass.yaml"
Region: !Ref AWS::Region

commands:
Expand Down

0 comments on commit 6320009

Please sign in to comment.