Kubernetes Manifest Text lost after save if invalid yaml is given
Author: linjmeyerCreated Jan 27, 2020Updated Jun 4, 2024
Labelsbeginner friendlyprovider/kubernetes-v2sig/kubernetes
Issue Summary:
If invalid yaml is passed into the Manifest Source field of a Deploy Manifest stage the text is deleted after saving.
Cloud Provider(s):
Kubernetes
Environment:
This is a new GKE cluster with a fresh Spinnaker install using Spinnaker for GCP
Feature Area:
Pipelines
Description:
Invalid yaml seems to be deleted from the Manifest Source field. After saving you will get the usual "In Sync with server" message and you will still see the contents of the text field. However if you refresh the page or run a pipeline the field is empty.
Steps to Reproduce:
- Create a new application and pipeline with k8s provider
- Add Deploy Manifest Step
- Add invalid yaml into Manifest Source field
- Save the pipeline
- Refresh the page or start the pipeline manually
This works as expected:
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: nginx
name: lin-test-new-cluster
namespace: dogfood
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- image: 'nginx:1.7.9'
name: nginx
ports:
- containerPort: 80While this fails because it's invalid and the entire text is lost:
!!!
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: nginx
name: lin-test-new-cluster
namespace: dogfood
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- image: 'nginx:1.7.9'
name: nginx
ports:
- containerPort: 80Additional Details:
Source: spinnaker/spinnaker