EUGENIO SOUZA CARVALHO hace 4 años
padre
commit
87d023b2e7
Se han modificado 2 ficheros con 34 adiciones y 7 borrados
  1. 33 6
      argoworkflow/workflow/040-sensor-github.yaml
  2. 1 1
      sc.yaml

+ 33 - 6
argoworkflow/workflow/040-sensor-github.yaml

@@ -78,6 +78,31 @@
 #     volumeMounts:
 #       - name: workdir
 #         mountPath: /go
+---
+apiVersion: v1
+kind: PersistentVolume
+metadata:
+  name: argo-pv-workflow
+  labels:
+    type: local
+    argowf: argo-pv-workflow
+spec:
+  storageClassName: standard
+  capacity:
+    storage: 10Gi
+  accessModes:
+    - ReadWriteOnce
+  hostPath:
+    path: "/kbctl"
+  nodeAffinity:
+    required:
+      nodeSelectorTerms:
+        - matchExpressions:
+            - key: kubernetes.io/hostname
+              operator: In
+              values:
+                - k8s
+---
 apiVersion: argoproj.io/v1alpha1
 kind: Sensor
 metadata:
@@ -116,15 +141,15 @@ spec:
                   - metadata:
                       name: workdir
                     spec:
-                      storageClassName: local-storage
-                      accessModes: ["ReadWriteOnce"]
-                      # selector:
-                      #   matchLabels:
-                      #     name: models-1-0-0
+                      storageClassName: standard
+                      accessModes:
+                        - ReadWriteOnce
+                      selector:
+                        matchLabels:
+                          argowf: argo-pv-workflow
                       resources:
                         requests:
                           storage: 1Gi
-
                 templates:
                   - name: ci-example
                     steps:
@@ -165,6 +190,7 @@ spec:
                       volumeMounts:
                         - name: workdir
                           mountPath: /go
+
                   - name: run-hello
                     inputs:
                       parameters:
@@ -182,6 +208,7 @@ spec:
                       volumeMounts:
                         - name: workdir
                           mountPath: /go
+
                   - name: release-artifact
                     container:
                       image: alpine:3.8

+ 1 - 1
sc.yaml

@@ -1,7 +1,7 @@
 apiVersion: storage.k8s.io/v1
 kind: StorageClass
 metadata:
-  name: local-storage
+  name: standard
 provisioner: kubernetes.io/no-provisioner
 volumeBindingMode: WaitForFirstConsumer
 allowVolumeExpansion: true