This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
storageClass: | |
name: s3-storageclass | |
provisioner: s3.csi.aws.com # Provisioner for AWS S3 | |
parameters: | |
type: standard | |
persistentVolume: | |
name: s3-pv | |
capacity: | |
storageSize: 5Gi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: {{ .Values.nginx.name }} | |
labels: | |
{{- with .Values.nginx.labels }} | |
{{- toYaml . | nindent 4 }} | |
{{- end }} | |
spec: | |
containers: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: {{ .Values.persistentVolumeClaim.name }} | |
spec: | |
accessModes: | |
- {{ .Values.persistentVolumeClaim.accessModes }} | |
storageClassName: {{ .Values.persistentVolumeClaim.storageClassName }} | |
resources: | |
requests: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
name: {{ .Values.persistentVolume.name }} | |
spec: | |
capacity: | |
storage: {{ .Values.persistentVolume.capacity.storageSize }} | |
volumeMode: {{ .Values.persistentVolume.volumeMode }} | |
accessModes: | |
- {{ .Values.persistentVolume.accessModes }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: storage.k8s.io/v1 | |
kind: StorageClass | |
metadata: | |
name: {{ .Values.storageClass.name }} | |
provisioner: {{ .Values.storageClass.provisioner }} # Provisioner for AWS S3 | |
parameters: | |
type: {{ .Values.storageClass.parameters.type }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
output "cluster_auth_token" { | |
description = "Amazon Elastic Kubernetes Service Cluster Authentication Token" | |
value = data.aws_eks_cluster_auth.eks_cluster.token | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
output "cluster_ca_certificate" { | |
description = "Amazon Elastic Kubernetes Service Cluster CA Certificate" | |
value = aws_eks_cluster.eks_cluster.certificate_authority[0].data | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
output "cluster_endpoint" { | |
description = "Amazon Elastic Kubernetes Service Cluster Endpoint" | |
value = aws_eks_cluster.eks_cluster.endpoint | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_eks_addon" "s3_csi" { | |
cluster_name = aws_eks_cluster.eks_cluster.name | |
addon_name = "aws-mountpoint-s3-csi-driver" | |
addon_version = data.aws_eks_addon_version.s3_csi.version | |
service_account_role_arn = aws_iam_role.s3_csi.arn | |
resolve_conflicts_on_create = "OVERWRITE" | |
tags = { | |
Name = "${var.eks.cluster_name}-aws-mountpoint-s3-csi-driver" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_iam_role_policy_attachment" "s3_csi" { | |
policy_arn = aws_iam_policy.s3_csi_bucket_policy.arn | |
role = aws_iam_role.s3_csi.name | |
} |
NewerOlder