From 2f6039dfd1bd6bc61233de8817b7012ec4554f71 Mon Sep 17 00:00:00 2001 From: jainish shah Date: Mon, 7 Nov 2016 10:48:18 -0800 Subject: [PATCH] reading resources from Values --- .gitignore | 35 +++++++++++++++++++ incubator/artifactory/README.md | 6 ++-- .../artifactory/templates/deployment.yaml | 4 +-- incubator/artifactory/values.yaml | 4 +++ 4 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..9a7c416b0b --- /dev/null +++ b/.gitignore @@ -0,0 +1,35 @@ +# General files for the project +pkg/* +*.pyc +bin/* +.project +/.bin +/_test/secrets/*.json + +# OSX leaves these everywhere on SMB shares +._* + +# OSX trash +.DS_Store + +# Files generated by JetBrains IDEs, e.g. IntelliJ IDEA +.idea/ +*.iml + +# Vscode files +.vscode + +# Emacs save files +*~ +\#*\# +.\#* + +# Vim-related files +[._]*.s[a-w][a-z] +[._]s[a-w][a-z] +*.un~ +Session.vim +.netrwhist + +# Chart dependencies +**/charts/*.tgz \ No newline at end of file diff --git a/incubator/artifactory/README.md b/incubator/artifactory/README.md index ca6fe299a6..35f182a4f7 100644 --- a/incubator/artifactory/README.md +++ b/incubator/artifactory/README.md @@ -30,8 +30,10 @@ $ helm install --name my-release incubator/artifactory Deletion of the PetSet doesn't cascade to deleting associated Pods and PVCs. To delete them: ``` -$ kubectl delete pods -l release=my-release,type=data -$ kubectl delete pvcs -l release=my-release,type=data +$ grace=$(kubectl get po artifactory --template '{{.spec.terminationGracePeriodSeconds}}') +$ kubectl delete petset,po -l app=artifactory +$ sleep $grace +$ kubectl delete pvc -l app=artifactory ``` ## Configuration diff --git a/incubator/artifactory/templates/deployment.yaml b/incubator/artifactory/templates/deployment.yaml index 927680bb65..af91f1a16a 100644 --- a/incubator/artifactory/templates/deployment.yaml +++ b/incubator/artifactory/templates/deployment.yaml @@ -31,9 +31,7 @@ spec: image: "{{default "docker.bintray.io/jfrog/artifactory-pro" .Values.image}}:{{default "4.13.2" .Values.imageTag}}" imagePullPolicy: {{default "IfNotPresent" .Values.pullPolicy}} resources: - requests: - cpu: {{default "200m" .Values.Cpu}} - memory: {{default "2048M" .Values.Memory}} +{{ toYaml .Values.resources | indent 10 }} ports: - containerPort: 8081 name: http diff --git a/incubator/artifactory/values.yaml b/incubator/artifactory/values.yaml index 01ed53ea81..54225a70eb 100644 --- a/incubator/artifactory/values.yaml +++ b/incubator/artifactory/values.yaml @@ -11,3 +11,7 @@ ImagePullPolicy: "Always" replicaCount: 1 # For minikube, set this to NodePort, elsewhere use LoadBalancer ServiceType: LoadBalancer +resources: + requests: + memory: 2048Mi + cpu: 200m \ No newline at end of file