mirror of https://github.com/helm/helm
commit
e38d3e8b8f
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
# Source: chart-with-template-with-invalid-yaml/templates/alpine-pod.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: "RELEASE-NAME-my-alpine"
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: waiter
|
||||||
|
image: "alpine:3.9"
|
||||||
|
command: ["/bin/sleep","9000"]
|
||||||
|
invalid
|
||||||
|
Error: YAML parse error on chart-with-template-with-invalid-yaml/templates/alpine-pod.yaml: error converting YAML to JSON: yaml: line 11: could not find expected ':'
|
@ -0,0 +1,3 @@
|
|||||||
|
Error: YAML parse error on chart-with-template-with-invalid-yaml/templates/alpine-pod.yaml: error converting YAML to JSON: yaml: line 11: could not find expected ':'
|
||||||
|
|
||||||
|
Use --debug flag to render out invalid YAML
|
@ -0,0 +1,8 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
description: Deploy a basic Alpine Linux pod
|
||||||
|
home: https://helm.sh/helm
|
||||||
|
name: chart-with-template-with-invalid-yaml
|
||||||
|
sources:
|
||||||
|
- https://github.com/helm/helm
|
||||||
|
version: 0.1.0
|
||||||
|
type: application
|
@ -0,0 +1,13 @@
|
|||||||
|
#Alpine: A simple Helm chart
|
||||||
|
|
||||||
|
Run a single pod of Alpine Linux.
|
||||||
|
|
||||||
|
This example was generated using the command `helm create alpine`.
|
||||||
|
|
||||||
|
The `templates/` directory contains a very simple pod resource with a
|
||||||
|
couple of parameters.
|
||||||
|
|
||||||
|
The `values.yaml` file contains the default values for the
|
||||||
|
`alpine-pod.yaml` template.
|
||||||
|
|
||||||
|
You can install this example using `helm install ./alpine`.
|
@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: "{{.Release.Name}}-{{.Values.Name}}"
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: waiter
|
||||||
|
image: "alpine:3.9"
|
||||||
|
command: ["/bin/sleep","9000"]
|
||||||
|
invalid
|
@ -0,0 +1 @@
|
|||||||
|
Name: my-alpine
|
@ -0,0 +1,9 @@
|
|||||||
|
dependencies:
|
||||||
|
- name: dev
|
||||||
|
repository: file://envs/dev
|
||||||
|
version: v0.1.0
|
||||||
|
- name: prod
|
||||||
|
repository: file://envs/prod
|
||||||
|
version: v0.1.0
|
||||||
|
digest: sha256:9403fc24f6cf9d6055820126cf7633b4bd1fed3c77e4880c674059f536346182
|
||||||
|
generated: "2020-02-03T10:38:51.180474+01:00"
|
@ -0,0 +1,22 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: parent-chart
|
||||||
|
version: v0.1.0
|
||||||
|
appVersion: v0.1.0
|
||||||
|
dependencies:
|
||||||
|
- name: dev
|
||||||
|
repository: "file://envs/dev"
|
||||||
|
version: ">= 0.0.1"
|
||||||
|
condition: dev.enabled,global.dev.enabled
|
||||||
|
tags:
|
||||||
|
- dev
|
||||||
|
import-values:
|
||||||
|
- data
|
||||||
|
|
||||||
|
- name: prod
|
||||||
|
repository: "file://envs/prod"
|
||||||
|
version: ">= 0.0.1"
|
||||||
|
condition: prod.enabled,global.prod.enabled
|
||||||
|
tags:
|
||||||
|
- prod
|
||||||
|
import-values:
|
||||||
|
- data
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: dev
|
||||||
|
version: v0.1.0
|
||||||
|
appVersion: v0.1.0
|
@ -0,0 +1,9 @@
|
|||||||
|
# Dev values parent-chart
|
||||||
|
nameOverride: parent-chart-dev
|
||||||
|
exports:
|
||||||
|
data:
|
||||||
|
resources:
|
||||||
|
autoscaler:
|
||||||
|
minReplicas: 1
|
||||||
|
maxReplicas: 3
|
||||||
|
targetCPUUtilizationPercentage: 80
|
@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: prod
|
||||||
|
version: v0.1.0
|
||||||
|
appVersion: v0.1.0
|
@ -0,0 +1,9 @@
|
|||||||
|
# Prod values parent-chart
|
||||||
|
nameOverride: parent-chart-prod
|
||||||
|
exports:
|
||||||
|
data:
|
||||||
|
resources:
|
||||||
|
autoscaler:
|
||||||
|
minReplicas: 2
|
||||||
|
maxReplicas: 5
|
||||||
|
targetCPUUtilizationPercentage: 90
|
@ -0,0 +1,16 @@
|
|||||||
|
###################################################################################################
|
||||||
|
# parent-chart horizontal pod autoscaler
|
||||||
|
###################################################################################################
|
||||||
|
apiVersion: autoscaling/v1
|
||||||
|
kind: HorizontalPodAutoscaler
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-autoscaler
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
spec:
|
||||||
|
scaleTargetRef:
|
||||||
|
apiVersion: apps/v1beta1
|
||||||
|
kind: Deployment
|
||||||
|
name: {{ .Release.Name }}
|
||||||
|
minReplicas: {{ required "A valid .Values.resources.autoscaler.minReplicas entry required!" .Values.resources.autoscaler.minReplicas }}
|
||||||
|
maxReplicas: {{ required "A valid .Values.resources.autoscaler.maxReplicas entry required!" .Values.resources.autoscaler.maxReplicas }}
|
||||||
|
targetCPUUtilizationPercentage: {{ required "A valid .Values.resources.autoscaler.targetCPUUtilizationPercentage!" .Values.resources.autoscaler.targetCPUUtilizationPercentage }}
|
@ -0,0 +1,10 @@
|
|||||||
|
# Default values for parent-chart.
|
||||||
|
nameOverride: parent-chart
|
||||||
|
tags:
|
||||||
|
dev: false
|
||||||
|
prod: true
|
||||||
|
resources:
|
||||||
|
autoscaler:
|
||||||
|
minReplicas: 0
|
||||||
|
maxReplicas: 0
|
||||||
|
targetCPUUtilizationPercentage: 99
|
@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Helm Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package kube // import "helm.sh/helm/v3/pkg/kube"
|
||||||
|
|
||||||
|
// ResourcePolicyAnno is the annotation name for a resource policy
|
||||||
|
const ResourcePolicyAnno = "helm.sh/resource-policy"
|
||||||
|
|
||||||
|
// KeepPolicy is the resource policy type for keep
|
||||||
|
//
|
||||||
|
// This resource policy type allows resources to skip being deleted
|
||||||
|
// during an uninstallRelease action.
|
||||||
|
const KeepPolicy = "keep"
|
Loading…
Reference in new issue