Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
23 changes: 23 additions & 0 deletions charts/scoop/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
24 changes: 24 additions & 0 deletions charts/scoop/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: scoop
description: A Helm chart for Kubernetes

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"
33 changes: 33 additions & 0 deletions charts/scoop/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Source: deployment-chart_4-18-0/templates/generic.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
annotations:
rbac.authorization.kubernetes.io/autoupdate: "true"
name: read-only-cluster-role-scoop
rules:
- apiGroups:
- '*'
resources:
- '*'

Check warning

Code scanning / SonarCloud

Wildcards should not be used to define RBAC permissions

<!--SONAR_ISSUE_KEY:AZBNv3oer0bfdS6iZmob-->Do not use wildcards when defining RBAC permissions. <p>See more on <a href="https://sonarcloud.io/project/issues?id=devtron-labs_charts&issues=AZBNv3oer0bfdS6iZmob&open=AZBNv3oer0bfdS6iZmob&pullRequest=229">SonarCloud</a></p>
verbs:
- get
- list
- watch
- apiGroups:
- extensions
resources:
- '*'

Check warning

Code scanning / SonarCloud

Wildcards should not be used to define RBAC permissions

<!--SONAR_ISSUE_KEY:AZBNv3oer0bfdS6iZmoc-->Do not use wildcards when defining RBAC permissions. <p>See more on <a href="https://sonarcloud.io/project/issues?id=devtron-labs_charts&issues=AZBNv3oer0bfdS6iZmoc&open=AZBNv3oer0bfdS6iZmoc&pullRequest=229">SonarCloud</a></p>
verbs:
- get
- list
- watch
- apiGroups:
- apps
resources:
- '*'

Check warning

Code scanning / SonarCloud

Wildcards should not be used to define RBAC permissions

<!--SONAR_ISSUE_KEY:AZBNv3oer0bfdS6iZmod-->Do not use wildcards when defining RBAC permissions. <p>See more on <a href="https://sonarcloud.io/project/issues?id=devtron-labs_charts&issues=AZBNv3oer0bfdS6iZmod&open=AZBNv3oer0bfdS6iZmod&pullRequest=229">SonarCloud</a></p>
verbs:
- get
- list
- watch
---
14 changes: 14 additions & 0 deletions charts/scoop/templates/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

# Source: deployment-chart_4-18-0/templates/generic.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: read-only-user-crb-scoop
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: read-only-cluster-role-scoop
subjects:
- kind: ServiceAccount
name: scoop-sa
namespace: {{ $.Values.scoopnamespace | default .Release.Namespace }}
14 changes: 14 additions & 0 deletions charts/scoop/templates/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if $.Values.ConfigMap.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $.Values.ConfigMap.name }}
namespace: {{ $.Values.scoopnamespace | default .Release.Namespace }}
{{- if $.Values.ConfigMap.data }}
data:
{{ toYaml $.Values.ConfigMap.data | indent 2 }}
{{- end }}
{{- end}}



74 changes: 74 additions & 0 deletions charts/scoop/templates/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@

apiVersion: apps/v1
kind: Deployment
metadata:
name: "release-name-deployment-chart-4-18-0"
labels:
app: "deployment-chart-4-18-0"
chart: "deployment-chart-4-18-0-4.18.0"
release: "release-name"
{{- if $.Values.labels }}
{{ toYaml $.Values.labels | nindent 4 }}
{{- end }}
namespace: {{ $.Values.scoopnamespace | default .Release.Namespace }}
spec:
selector:
matchLabels:
app: "deployment-chart-4-18-0"
release: "release-name"
replicas: 1
minReadySeconds: 60
template:
metadata:
labels:
app: "deployment-chart-4-18-0"
release: "release-name"
{{- if $.Values.labels }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here rendering we not required for extra levels .

{{ toYaml $.Values.labels | indent 4 }}
{{- end }}
spec:

Check warning

Code scanning / SonarCloud

Service account tokens should not be mounted in pods

<!--SONAR_ISSUE_KEY:AZBNv3oFr0bfdS6iZmoa-->Set automountServiceAccountToken to false for this specification of kind Deployment. <p>See more on <a href="https://sonarcloud.io/project/issues?id=devtron-labs_charts&issues=AZBNv3oFr0bfdS6iZmoa&open=AZBNv3oFr0bfdS6iZmoa&pullRequest=229">SonarCloud</a></p>
#serviceAccount: scoop-sa
serviceAccountName: scoop-sa
terminationGracePeriodSeconds: 30
imagePullSecrets:
- name: {{ $.Values.imagePullSecrets }}
restartPolicy: Always
containers:
- name: "deployment-chart-4-18-0"
image: {{ $.Values.image.name }}
imagePullPolicy: IfNotPresent
ports:
- name: app
containerPort: {{ $.Values.containerPort }}
protocol: TCP
{{- if $.Values.env }}
env:
{{ toYaml $.Values.env | indent 12 }}
{{- end }}

{{- if or $.Values.ConfigMap.data $.Values.secrets.data }}
envFrom:
{{- if $.Values.ConfigMap.enabled }}
- configMapRef:
name: {{ $.Values.ConfigMap.name }}
{{- end }}

{{- if $.Values.secrets.data }}
- SecretRef:
name: {{ $.Values.secrets.name }}
{{- end }}

{{- end}}

{{- if $.Values.resources }}
resources:
{{ toYaml $.Values.resources | indent 12 }}
{{- end }}

{{- if $.Values.volumeMounts }}
volumeMounts:
{{ toYaml $.Values.volumeMounts | indent 12 }}
{{- end }}
revisionHistoryLimit: 3
#strategy: {}

13 changes: 13 additions & 0 deletions charts/scoop/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{- if $.Values.secrets.enabled }}
apiVersion: v1
kind: Secret
metadata:
name: scoop-secret
namespace: {{ $.Values.scoopnamespace | default .Release.Namespace }}
type: Opaque
{{- if $.Values.secrets.data }}
data:
{{ toYaml $.Values.secrets.data | indent 2 }}
{{- end }}
{{- end }}

27 changes: 27 additions & 0 deletions charts/scoop/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# deployment-chart-4-18-0-4.18.0urce: deployment-chart-4-18-0/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: "release-name-deployment-chart-4-18-0-service"
labels:
app: "deployment-chart-4-18-0"
release: "release-name"
{{- if $.Values.labels }}
{{ toYaml .Values.labels | indent 2 }}
{{- end }}
namespace: {{ $.Values.scoopnamespace | default .Release.Namespace }}

spec:
{{- with $.Values.service.type }}
type: {{ $.Values.service.type }}
{{- end }}
ports:
{{- with $.Values.service.port }}
- port: {{ $.Values.service.port }}
{{- end }}
targetPort: 80
protocol: TCP
name: app
selector:
app: "deployment-chart-4-18-0"

12 changes: 12 additions & 0 deletions charts/scoop/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Source: deployment-chart-4-18-0/templates/generic.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: scoop-sa
#namespace: monitoring
namespace: {{ $.Values.scoopnamespace | default .Release.Namespace }}





59 changes: 59 additions & 0 deletions charts/scoop/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
scoopnamespace: monitoring

service:
type: ClusterIP
port: 80

replicacount: 1
imagePullSecrets: devtron-image-pull
image:
name: "nginx"

containerPort: 80

env:
- name: CONFIG-HASH
value: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b
- name: SECRET-HASH
value: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
- name: DEVTRON-APP-NAME
value: deployment-chart-4-18-0
- name: POD-NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: DEVTRON-CONTAINER-REPO
value: ""
- name: DEVTRON-CONTAINER-TAG
value: "1-95af053"
- name: X-PASS-KEY
value: "random-string"
- name: PASS-KEY
value: "random-string"
- name: RETENTION
value: "10080"

ConfigMap:
name: scoop-config
enabled: true
data:
key1: "key1value-1"
key2: "keyvalue2"

secrets:
name: scoop-secret
enabled: true
data: []

volumeMounts: []

resources:
limits:
cpu: "0.5"
memory: 5Gi
requests:
cpu: "0.3"
memory: 2Gi

#strategy: {}