Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ks-core version to v1.1.1 #417

Merged
merged 1 commit into from
Sep 14, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion src/main/ks-core/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ 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: 1.1.0
version: 1.1.1

# 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
Expand Down
8 changes: 8 additions & 0 deletions src/main/ks-core/templates/_images.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ Return the proper image name
{{ include "common.images.image" (dict "imageRoot" .Values.preUpgrade.image "global" .Values.global) }}
{{- end -}}

{{- define "extensions_museum.image" -}}
{{ include "common.images.image" (dict "imageRoot" .Values.ksExtensionRepository.image "global" .Values.global) }}
{{- end -}}

{{- define "common.images.image" -}}
{{- $registryName := .global.imageRegistry -}}
{{- $repositoryName := .imageRoot.repository -}}
Expand Down Expand Up @@ -70,6 +74,10 @@ Return the proper Docker Image Registry Secret Names
{{- include "common.images.pullSecrets" (dict "images" (list .Values.controller.image) "global" .Values.global) -}}
{{- end -}}

{{- define "extensions_museum.imagePullSecrets" -}}
{{- include "common.images.pullSecrets" (dict "images" (list .Values.ksExtensionRepository.image) "global" .Values.global) -}}
{{- end -}}

{{- define "common.images.pullSecrets" -}}
{{- $pullSecrets := list }}

Expand Down
74 changes: 74 additions & 0 deletions src/main/ks-core/templates/extension-museum.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{{- if .Values.ksExtensionRepository.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: extensions-museum
namespace: {{ .Release.Namespace }}
labels:
app: extensions-museum
spec:
replicas: 1
selector:
matchLabels:
app: extensions-museum
template:
metadata:
labels:
app: extensions-museum
spec:
{{- include "extensions_museum.imagePullSecrets" . | nindent 6 }}
containers:
- name: extensions-museum
image: {{ template "extensions_museum.image" . }}
command:
- "/chartmuseum"
- "--storage-local-rootdir"
- "/charts"
- "--storage"
- "local"
ports:
- containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: extensions-museum
namespace: {{ .Release.Namespace }}
spec:
selector:
app: extensions-museum
ports:
- protocol: TCP
port: 80
targetPort: 8080

---
apiVersion: kubesphere.io/v1alpha1
kind: Repository
metadata:
name: extensions-museum
spec:
url: http://extensions-museum.{{ .Release.Namespace }}.svc

---
apiVersion: batch/v1
kind: CronJob
metadata:
name: restart-extensions-museum
namespace: {{ .Release.Namespace }}
spec:
schedule: "0 0 * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: restart-extensions-museum
image: {{ template "kubectl.image" . }}
command:
- /bin/sh
- -c
- "kubectl rollout restart deployment/extensions-museum -n {{ .Release.Namespace }}"
restartPolicy: OnFailure
serviceAccountName: {{ template "ks-core.serviceAccountName" . }}
{{end}}
9 changes: 9 additions & 0 deletions src/main/ks-core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -434,3 +434,12 @@ ksCRDs:
requests:
cpu: 20m
memory: 100Mi

# add museum for all ks-extensions
ksExtensionRepository:
enabled: true
image:
registry: ""
repository: kubesphere/ks-extensions-museum
tag: "latest"
pullPolicy: Always
Loading