Commit fb507273 authored by Prout, Ryan's avatar Prout, Ryan
Browse files

add simple example for fs mounting

parent 34c44b31
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
apiVersion: v1
description: A Helm chart example for deploying a pod and mounting NCCS filesystems
name: fs-deployment
version: 1.0.0
+0 −0

Empty file added.

+16 −0
Original line number Diff line number Diff line
{{/*
Expand the name of the chart.
*/}}
{{- define "{{ .Values.fs-deployment.name }}.name" -}}
{{- default .Release.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "{{ .Values.fs-deployment.name }}.fullname" -}}
{{- $name := default "{{ .Values.fs-deployment.name }}" .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
+34 −0
Original line number Diff line number Diff line
apiVersion: apps/v1
kind: Deployment
metadata:
  # This annotation is what enables the NCCS filesystem mount
  annotations:
    ccs.ornl.gov/fs: olcf
  name: {{ .Values.fsMount.name }}
spec:
  selector:
    matchLabels:
      app: {{ .Values.fsMount.name }} # has to match .spec.template.metadata.labels
  strategy:
    # Specifies the strategy used to replace old Pods by new ones
    # Refer: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
    type: Recreate
  template:
    metadata:
      labels:
        app: {{ .Values.fsMount.name }}
    spec:
      containers:
      - name: fs-deployment
        image: alpine:latest
        command:
        - sh
        - -c
        - 'exec tail -f /dev/null'
        resources:
          limits:
            cpu: {{ .Values.fsMount.resources.limits.cpu }}
            memory: {{ .Values.fsMount.resources.limits.memory }}
          requests:
            cpu: {{ .Values.fsMount.resources.requests.cpu }}
            memory: {{ .Values.fsMount.resources.requests.memory }}
+12 −0
Original line number Diff line number Diff line
# This can be used to provide variables to your chart. 
# A simple example would be resources in the minio-standalone-deployment.yaml:

fsMount:
  resources:
    requests:
      cpu: 2
      memory: 1Gi
    limits:
      cpu: 2
      memory: 1Gi
  name: fs-deployment