-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cc00faa
commit 4087807
Showing
10 changed files
with
566 additions
and
974 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
|
||
data "google_client_config" "default" {} | ||
|
||
data "google_container_cluster" "testbed_cluster" { | ||
name = var.cluster_name | ||
location = var.project_region | ||
} | ||
|
||
data "kustomization_build" "training-operator" { | ||
path = "github.com/kubeflow/manifests.git/apps/training-operator/upstream/overlays/standalone?ref=${var.kubeflow_version}" | ||
} | ||
|
||
|
||
resource "kustomization_resource" "training-operator" { | ||
for_each = data.kustomization_build.training-operator.ids | ||
manifest = data.kustomization_build.training-operator.manifests[each.value] | ||
} | ||
|
||
# Create NFS resource | ||
resource "helm_release" "nfs_client_provisioner" { | ||
name = var.nfs_provider_information.release_name | ||
repository = var.nfs_provisioner_repo_url | ||
chart = var.nfs_provider_information.chart_name | ||
|
||
namespace = var.nfs_provider_information.namespace | ||
create_namespace = true | ||
|
||
values = [ | ||
templatefile("${path.module}/values.nfs.yaml.tpl", { | ||
nfs_server_path = var.nfs_provider_information.server_path | ||
image_repository = var.nfs_provider_information.image_repository | ||
image_tag = var.nfs_provider_information.image_tag | ||
image_policy = var.nfs_provider_information.pull_policy | ||
nfs_size = var.nfs_provider_information.storage_size | ||
}) | ||
] | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
Default values for nfs-provisioner. | ||
# This is a YAML-formatted file. | ||
# Declare variables to be passed into your templates. | ||
|
||
replicaCount: 1 | ||
|
||
# imagePullSecrets: | ||
|
||
image: | ||
repository: ${image_repository} | ||
tag: ${image_tag} | ||
pullPolicy: ${pull_policy} | ||
|
||
# For a list of available arguments | ||
# Please see https://github.com/kubernetes-incubator/external-storage/blob/master/nfs/docs/deployment.md#arguments | ||
extraArgs: {} | ||
# device-based-fsids: false | ||
|
||
service: | ||
type: ClusterIP | ||
|
||
nfsPort: 2049 | ||
nlockmgrPort: 32803 | ||
mountdPort: 20048 | ||
rquotadPort: 875 | ||
rpcbindPort: 111 | ||
statdPort: 662 | ||
# nfsNodePort: | ||
# nlockmgrNodePort: | ||
# mountdNodePort: | ||
# rquotadNodePort: | ||
# rpcbindNodePort: | ||
# statdNodePort: | ||
|
||
externalIPs: [] | ||
|
||
persistence: | ||
enabled: true | ||
|
||
## Persistent Volume Storage Class | ||
## If defined, storageClassName: <storageClass> | ||
## If set to "-", storageClassName: "", which disables dynamic provisioning | ||
## If undefined (the default) or set to null, no storageClassName spec is | ||
## set, choosing the default provisioner. (gp2 on AWS, standard on | ||
## GKE, AWS & OpenStack) | ||
## | ||
storageClass: "default" | ||
|
||
accessMode: ReadWriteOnce | ||
size: ${nfs_size} | ||
|
||
## For creating the StorageClass automatically: | ||
storageClass: | ||
create: true | ||
|
||
## Set a provisioner name. If unset, a name will be generated. | ||
# provisionerName: | ||
|
||
## Set StorageClass as the default StorageClass | ||
## Ignored if storageClass.create is false | ||
defaultClass: false | ||
|
||
## Set a StorageClass name | ||
## Ignored if storageClass.create is false | ||
name: nfs | ||
|
||
# set to null to prevent expansion | ||
allowVolumeExpansion: true | ||
## StorageClass parameters | ||
parameters: {} | ||
|
||
mountOptions: | ||
- vers=3 | ||
|
||
## ReclaimPolicy field of the class, which can be either Delete or Retain | ||
reclaimPolicy: Delete | ||
|
||
## For RBAC support: | ||
rbac: | ||
create: true | ||
|
||
## Ignored if rbac.create is true | ||
## | ||
serviceAccountName: default | ||
|
||
resources: {} | ||
# limits: | ||
# cpu: 100m | ||
# memory: 128Mi | ||
# requests: | ||
# cpu: 100m | ||
# memory: 128Mi | ||
|
||
nodeSelector: {} | ||
|
||
tolerations: [] | ||
|
||
affinity: {} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
variable "kubernetes_config_path" { | ||
description = "Path of Kubernetes configuration file (change for non-default kubectl setup)" | ||
default = "~/.kube/config" | ||
} | ||
|
||
variable "project_id" { | ||
type = string | ||
default = "qpecs-fltk-2022" | ||
description = "Google Cloud project name to create cluster in." | ||
} | ||
|
||
variable "cluster_name" { | ||
type = string | ||
default = "fltk-testbed-cluster" | ||
description = "Name of the GKE cluster to be deployed in project <project_id>." | ||
} | ||
|
||
variable "project_region" { | ||
type = string | ||
default = "us-central1" | ||
description = "GKE region to deploy cluster in." | ||
} | ||
|
||
variable "description" { | ||
type = string | ||
default = "Managed by terraform FLTK testbed deployment" | ||
} | ||
|
||
variable "account_id" { | ||
type = string | ||
description = "The service account Identifier to be used to interact with Google cloud." | ||
default = "terraform-iam-service-account" | ||
} | ||
|
||
variable "kubeflow_version" { | ||
type = string | ||
description = "Kubeflow (training operator) to install." | ||
default = "v1.5.0" | ||
} | ||
|
||
variable "nfs_provider_information" { | ||
type = object({ | ||
release_name = string | ||
chart_name = string | ||
namespace = string | ||
server_path = string | ||
image_repository = string | ||
image_tag = string | ||
pull_policy = string | ||
storage_size = string | ||
}) | ||
default = { | ||
release_name = "nfs-client-provisioner" | ||
chart_name = "nfs-client-provisioner" | ||
namespace = "test" | ||
server_path = "/mnt/kubernetes" | ||
image_repository = "quay.io/external_storage/nfs-client-provisioner" | ||
image_tag = "v3.1.0-k8s1.11" | ||
pull_policy = "IfNotPresent" | ||
storage_size = "50" | ||
} | ||
} | ||
|
||
variable "nfs_provisioner_repo_url" { | ||
description = "Repository URL to locate the utilized helm charts" | ||
type = string | ||
default = "https://kvaps.github.io/charts" | ||
} |
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
File renamed without changes.
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.