Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle >63 character long PVC names #171

Merged
merged 2 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions testing/yaml/datacreation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,32 @@ spec:
- name: config-volume
configMap:
name: createfile
---
apiVersion: batch/v1
kind: Job
metadata:
name: prometheus-kube-prometheus-stack-prometheus-db-prometheus-kube-prometheus-stack-prometheus-0
spec:
template:
spec:
containers:
- name: training-container
image: registry.k8s.io/nginx-slim:0.8
command:
- bash
- /app/create.sh
volumeMounts:
- mountPath: /pvmigrate/
name: data-volume
- name: config-volume
mountPath: /app/create.sh
subPath: create.sh
restartPolicy: Never
volumes:
- name: data-volume
persistentVolumeClaim:
claimName: prometheus-kube-prometheus-stack-prometheus-db-prometheus-kube-prometheus-stack-prometheus-0
- name: config-volume
configMap:
name: createfile
---
39 changes: 39 additions & 0 deletions testing/yaml/datavalidation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,42 @@ spec:
configMap:
name: filecontents
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: prometheus-kube-prometheus-stack-prometheus-db-prometheus-kube-prometheus-stack-prometheus-0
spec:
replicas: 1
selector:
matchLabels:
app: very-long-pvc-name
template:
metadata:
labels:
app: very-long-pvc-name
spec:
containers:
- name: nginx
image: registry.k8s.io/nginx-slim:0.8
ports:
- containerPort: 80
name: web
volumeMounts:
- name: data-volume
mountPath: /pvmigrate
- name: config-volume
mountPath: /app/contents.sh
subPath: contents.sh
readinessProbe:
exec:
command:
- bash
- /app/contents.sh
volumes:
- name: data-volume
persistentVolumeClaim:
claimName: prometheus-kube-prometheus-stack-prometheus-db-prometheus-kube-prometheus-stack-prometheus-0
- name: config-volume
configMap:
name: filecontents
---
13 changes: 12 additions & 1 deletion testing/yaml/pvcs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,15 @@ spec:
storage: 1Gi
storageClassName: int-source
---
# TODO: add PVC name with >63 characters
# this PVC name is more than 63 characters and thus will not fit in a label/annotation
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: prometheus-kube-prometheus-stack-prometheus-db-prometheus-kube-prometheus-stack-prometheus-0
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: int-source