Skip to content

Commit e60ef32

Browse files
authored
Merge pull request #86 from NIAEFEUP/feature/add-nfs-storage-class
feat: add nfs storage class
2 parents 014ced3 + 6a5ccbd commit e60ef32

File tree

4 files changed

+140
-0
lines changed

4 files changed

+140
-0
lines changed

services/pulumi/niployments/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// ementas is an example pulumi service
22
// import "./services/ementas/index.js";
33
import "./services/tts/index.js";
4+
import "./resources/nfs-provisioner/charts.js";
45
import "./resources/keel/charts.js";
56

67
import { CommitSignal } from "./utils/pending.js";

services/pulumi/niployments/resources/keel/charts.ts

+7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
import * as k8s from "@pulumi/kubernetes";
22

3+
const namespace = new k8s.core.v1.Namespace("keel-namespace", {
4+
metadata: {
5+
name: "keel",
6+
},
7+
});
8+
39
export const chart = new k8s.helm.v4.Chart("keel-chart", {
410
chart: "keel",
11+
namespace: namespace.metadata.name,
512
skipAwait: true,
613
repositoryOpts: {
714
repo: "https://charts.keel.sh",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import * as k8s from "@pulumi/kubernetes";
2+
3+
const namespace = new k8s.core.v1.Namespace("nfs-provisioner-namespace", {
4+
metadata: {
5+
name: "nfs-provisioner",
6+
},
7+
});
8+
9+
export const chart = new k8s.helm.v4.Chart("nfs-provisioner-chart", {
10+
chart: "nfs-subdir-external-provisioner",
11+
namespace: namespace.metadata.name,
12+
skipAwait: true,
13+
repositoryOpts: {
14+
repo: "https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner",
15+
},
16+
valueYamlFiles: ["./values.yaml"],
17+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
replicaCount: 1
2+
strategyType: Recreate
3+
4+
image:
5+
repository: registry.k8s.io/sig-storage/nfs-subdir-external-provisioner
6+
tag: v4.0.2
7+
pullPolicy: IfNotPresent
8+
imagePullSecrets: []
9+
10+
nfs:
11+
server: "10.10.0.5"
12+
path: /mnt/hard-storage/shared_dir
13+
mountOptions:
14+
volumeName: nfs-subdir-external-provisioner-root
15+
# Reclaim policy for the main nfs volume
16+
reclaimPolicy: Retain
17+
18+
# For creating the StorageClass automatically:
19+
storageClass:
20+
create: true
21+
22+
# Set a provisioner name. If unset, a name will be generated.
23+
# provisionerName:
24+
25+
# Set StorageClass as the default StorageClass
26+
# Ignored if storageClass.create is false
27+
defaultClass: false
28+
29+
# Set a StorageClass name
30+
# Ignored if storageClass.create is false
31+
name: niployments-hdd-nfs
32+
33+
# Allow volume to be expanded dynamically
34+
allowVolumeExpansion: true
35+
36+
# Method used to reclaim an obsoleted volume
37+
reclaimPolicy: Delete
38+
39+
# When set to false your PVs will not be archived by the provisioner upon deletion of the PVC.
40+
archiveOnDelete: true
41+
42+
# If it exists and has 'delete' value, delete the directory. If it exists and has 'retain' value, save the directory.
43+
# Overrides archiveOnDelete.
44+
# Ignored if value not set.
45+
onDelete:
46+
47+
# Specifies a template for creating a directory path via PVC metadata's such as labels, annotations, name or namespace.
48+
# Ignored if value not set.
49+
pathPattern:
50+
51+
# Set access mode - ReadWriteOnce, ReadOnlyMany or ReadWriteMany
52+
accessModes: ReadWriteOnce
53+
54+
# Set volume bindinng mode - Immediate or WaitForFirstConsumer
55+
volumeBindingMode: Immediate
56+
57+
# Storage class annotations
58+
annotations: {}
59+
60+
leaderElection:
61+
# When set to false leader election will be disabled
62+
enabled: true
63+
64+
## For RBAC support:
65+
rbac:
66+
# Specifies whether RBAC resources should be created
67+
create: true
68+
69+
# If true, create & use Pod Security Policy resources
70+
# https://kubernetes.io/docs/concepts/policy/pod-security-policy/
71+
podSecurityPolicy:
72+
enabled: false
73+
74+
# Deployment pod annotations
75+
podAnnotations: {}
76+
77+
## Set pod priorityClassName
78+
# priorityClassName: ""
79+
80+
podSecurityContext: {}
81+
82+
securityContext: {}
83+
84+
serviceAccount:
85+
# Specifies whether a ServiceAccount should be created
86+
create: true
87+
88+
# Annotations to add to the service account
89+
annotations: {}
90+
91+
# The name of the ServiceAccount to use.
92+
# If not set and create is true, a name is generated using the fullname template
93+
name:
94+
95+
resources:
96+
{}
97+
# limits:
98+
# cpu: 100m
99+
# memory: 128Mi
100+
# requests:
101+
# cpu: 100m
102+
# memory: 128Mi
103+
104+
nodeSelector: {}
105+
106+
tolerations: []
107+
108+
affinity: {}
109+
110+
# Additional labels for any resource created
111+
labels: {}
112+
113+
podDisruptionBudget:
114+
enabled: false
115+
maxUnavailable: 1

0 commit comments

Comments
 (0)