Skip to content

Commit 116a67e

Browse files
authored
新增几个应用 (#150)
* add keda Signed-off-by: roc <[email protected]> * update keda Chart.yaml Signed-off-by: roc <[email protected]> * keda: update image to tke-market Signed-off-by: roc <[email protected]> * add keda-tencentcloud-clb-scaler Signed-off-by: roc <[email protected]> * add cert-manager-webhook-dnspod Signed-off-by: roc <[email protected]> --------- Signed-off-by: roc <[email protected]>
1 parent a89b653 commit 116a67e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+14400
-27
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
apiVersion: v2
2-
appVersion: 1.3.0
2+
appVersion: 1.5.2
33
description: cert-manager webhook solver for DNSPod
44
name: cert-manager-webhook-dnspod
5-
version: 1.4.5
6-
type: application
75
icon: https://cloudcache.tencent-cloud.com/qcloud/ui/static/Industry_tke/6708b51c-0c8e-4409-8a25-74991cc89065.png
86
maintainers:
97
- name: rockerchen
108
9+
type: application
10+
version: 1.5.2

incubator/cert-manager-webhook-dnspod/templates/deployment.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,17 @@ spec:
2222
spec:
2323
serviceAccountName: {{ include "dnspod-webhook.fullname" . }}
2424
containers:
25-
- name: {{ .Chart.Name }}
26-
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
25+
- name: webhook
26+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
2727
imagePullPolicy: {{ .Values.image.pullPolicy }}
2828
args:
2929
- --tls-cert-file=/tls/tls.crt
3030
- --tls-private-key-file=/tls/tls.key
3131
env:
3232
- name: GROUP_NAME
3333
value: {{ .Values.groupName | quote }}
34+
- name: LOG_LEVEL
35+
value: {{ .Values.logLevel | quote }}
3436
ports:
3537
- name: https
3638
containerPort: 443

incubator/cert-manager-webhook-dnspod/templates/pki.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ spec:
9494
{{- else }}
9595
server: https://acme-v02.api.letsencrypt.org/directory
9696
{{- end }}
97-
email: {{ .Values.clusterIssuer.email }}
97+
{{- with .Values.clusterIssuer.email }}
98+
email: {{ . }}
99+
{{- end }}
98100
privateKeySecretRef:
99101
name: {{ include "dnspod-webhook.fullname" . }}-letsencrypt
100102
solvers:
@@ -104,9 +106,11 @@ spec:
104106
solverName: dnspod
105107
config:
106108
ttl: {{ .Values.clusterIssuer.ttl }}
107-
secretId: {{ required ".Values.clusterIssuer.secretId is required" .Values.clusterIssuer.secretId }}
109+
secretIdRef:
110+
key: secretId
111+
name: {{ include "dnspod-webhook.fullname" . }}-secret
108112
secretKeyRef:
109-
key: secret-key
113+
key: secretKey
110114
name: {{ include "dnspod-webhook.fullname" . }}-secret
111115
{{- if .Values.clusterIssuer.selector }}
112116
selector: {{ toYaml .Values.clusterIssuer.selector | nindent 8 }}

incubator/cert-manager-webhook-dnspod/templates/secret.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ metadata:
1111
heritage: {{ .Release.Service }}
1212
type: Opaque
1313
data:
14-
secret-key: {{ required ".Values.clusterIssuer.secretKey is required" .Values.clusterIssuer.secretKey | b64enc | quote }}
14+
secretId: {{ required ".Values.clusterIssuer.secretId is required" .Values.clusterIssuer.secretId | b64enc | quote }}
15+
secretKey: {{ required ".Values.clusterIssuer.secretKey is required" .Values.clusterIssuer.secretKey | b64enc | quote }}
1516
{{- end }}

incubator/cert-manager-webhook-dnspod/values.yaml

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,29 @@
66
# solve the DNS01 challenge.
77
# This group name should be **unique**, hence using your own company's domain
88
# here is recommended.
9-
groupName: acme.imroc.cc
9+
groupName: acme.dnspod.com
10+
11+
# log level of the webhook server: debug, info, warn, error
12+
logLevel: info
1013

1114
certManager:
1215
namespace: cert-manager
1316
serviceAccountName: cert-manager
1417

1518
image:
1619
repository: ccr.ccs.tencentyun.com/tke-market/cert-manager-webhook-dnspod
17-
tag: 1.3.0
18-
pullPolicy: Always
20+
tag: ""
21+
pullPolicy: IfNotPresent
1922

2023
clusterIssuer:
21-
enabled: true
24+
enabled: false
2225
name: dnspod
2326
ttl: 600
2427
staging: false
2528
secretId: ""
2629
secretKey: ""
27-
#email:
28-
30+
recordLine: ""
31+
email: ""
2932
# https://cert-manager.io/docs/configuration/acme/#adding-multiple-solver-types
3033
#selector:
3134
# dnsZones:
@@ -38,18 +41,17 @@ service:
3841
type: ClusterIP
3942
port: 443
4043

41-
resources:
42-
{}
43-
# We usually recommend not to specify default resources and to leave this as a conscious
44-
# choice for the user. This also increases chances charts run on environments with little
45-
# resources, such as Minikube. If you do want to specify resources, uncomment the following
46-
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
47-
# limits:
48-
# cpu: 100m
49-
# memory: 128Mi
50-
# requests:
51-
# cpu: 100m
52-
# memory: 128Mi
44+
resources: {}
45+
# We usually recommend not to specify default resources and to leave this as a conscious
46+
# choice for the user. This also increases chances charts run on environments with little
47+
# resources, such as Minikube. If you do want to specify resources, uncomment the following
48+
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
49+
# limits:
50+
# cpu: 100m
51+
# memory: 128Mi
52+
# requests:
53+
# cpu: 100m
54+
# memory: 128Mi
5355

5456
nodeSelector: {}
5557

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: v2
2+
appVersion: 1.0.0
3+
description: Helm chart for keda external scaler of tencentcloud clb
4+
home: https://github.com/imroc/keda-tencentcloud-clb-scaler
5+
name: keda-tencentcloud-clb-scaler
6+
type: application
7+
version: 1.0.0
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "clb-scaler.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
8+
{{/*
9+
Create a default fully qualified app name.
10+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11+
If release name contains chart name it will be used as a full name.
12+
*/}}
13+
{{- define "clb-scaler.fullname" -}}
14+
{{- if .Values.fullnameOverride }}
15+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16+
{{- else }}
17+
{{- $name := default .Chart.Name .Values.nameOverride }}
18+
{{- if contains $name .Release.Name }}
19+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
20+
{{- else }}
21+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22+
{{- end }}
23+
{{- end }}
24+
{{- end }}
25+
26+
{{/*
27+
Create chart name and version as used by the chart label.
28+
*/}}
29+
{{- define "clb-scaler.chart" -}}
30+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31+
{{- end }}
32+
33+
{{/*
34+
Common labels
35+
*/}}
36+
{{- define "clb-scaler.labels" -}}
37+
helm.sh/chart: {{ include "clb-scaler.chart" . }}
38+
{{ include "clb-scaler.selectorLabels" . }}
39+
{{- if .Chart.AppVersion }}
40+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41+
{{- end }}
42+
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- end }}
44+
45+
{{/*
46+
Selector labels
47+
*/}}
48+
{{- define "clb-scaler.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "clb-scaler.name" . }}
50+
app.kubernetes.io/instance: {{ .Release.Name }}
51+
{{- end }}
52+
53+
{{/*
54+
Create the name of the service account to use
55+
*/}}
56+
{{- define "clb-scaler.serviceAccountName" -}}
57+
{{- if .Values.serviceAccount.create }}
58+
{{- default (include "clb-scaler.fullname" .) .Values.serviceAccount.name }}
59+
{{- else }}
60+
{{- default "default" .Values.serviceAccount.name }}
61+
{{- end }}
62+
{{- end }}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: {{ include "clb-scaler.fullname" . }}
5+
labels:
6+
{{- include "clb-scaler.labels" . | nindent 4 }}
7+
spec:
8+
selector:
9+
matchLabels:
10+
{{- include "clb-scaler.selectorLabels" . | nindent 6 }}
11+
template:
12+
metadata:
13+
{{- with .Values.podAnnotations }}
14+
annotations:
15+
{{- toYaml . | nindent 8 }}
16+
{{- end }}
17+
labels:
18+
{{- include "clb-scaler.labels" . | nindent 8 }}
19+
{{- with .Values.podLabels }}
20+
{{- toYaml . | nindent 8 }}
21+
{{- end }}
22+
spec:
23+
hostAliases:
24+
- hostnames:
25+
- clb.tencentcloudapi.com
26+
- monitor.tencentcloudapi.com
27+
ip: 169.254.0.95
28+
{{- with .Values.imagePullSecrets }}
29+
imagePullSecrets:
30+
{{- toYaml . | nindent 8 }}
31+
{{- end }}
32+
securityContext:
33+
{{- toYaml .Values.podSecurityContext | nindent 8 }}
34+
containers:
35+
- name: {{ .Chart.Name }}
36+
securityContext:
37+
{{- toYaml .Values.securityContext | nindent 12 }}
38+
image: '{{ .Values.image.repository }}:{{ .Values.image.tag | default (printf "v%s" .Chart.AppVersion) }}'
39+
imagePullPolicy: {{ .Values.image.pullPolicy }}
40+
ports:
41+
- name: grpc
42+
containerPort: {{ .Values.service.port }}
43+
protocol: TCP
44+
env:
45+
- name: SECRET_ID
46+
value: {{ required "credentials.secretId is required!" .Values.credentials.secretId }}
47+
- name: SECRET_KEY
48+
value: {{ required "credentials.secretKey is required!" .Values.credentials.secretKey }}
49+
- name: REGION
50+
value: {{ required "region is required!" .Values.region }}
51+
{{- if .Values.timeZone }}
52+
- name: TZ
53+
value: {{ .Values.timeZone }}
54+
{{- end }}
55+
resources:
56+
{{- toYaml .Values.resources | nindent 12 }}
57+
{{- with .Values.nodeSelector }}
58+
nodeSelector:
59+
{{- toYaml . | nindent 8 }}
60+
{{- end }}
61+
{{- with .Values.affinity }}
62+
affinity:
63+
{{- toYaml . | nindent 8 }}
64+
{{- end }}
65+
{{- with .Values.tolerations }}
66+
tolerations:
67+
{{- toYaml . | nindent 8 }}
68+
{{- end }}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: {{ include "clb-scaler.fullname" . }}
5+
labels:
6+
{{- include "clb-scaler.labels" . | nindent 4 }}
7+
spec:
8+
type: {{ .Values.service.type }}
9+
ports:
10+
- port: {{ .Values.service.port }}
11+
targetPort: grpc
12+
protocol: TCP
13+
name: grpc
14+
selector:
15+
{{- include "clb-scaler.selectorLabels" . | nindent 4 }}

0 commit comments

Comments
 (0)