-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: release KubePanel v1.0.0 (#4401)
* feat: Replaced mobx with zustand * fix: displayed wrong time and info * fix: The content of badge overflow * style: Collected theme and added dumpKubeObject function * feat: Ingress & Secret resource * fix: errors in using next build * feat: Events overview and new UI components * feat: kubeconfig parser * feat: KubePanel v1.0.0 * fix: merge conflict * fix: Add clear logo and icon * fix: Fixed Sider * feat: Auto deploy
- Loading branch information
Showing
76 changed files
with
2,003 additions
and
1,314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM scratch | ||
|
||
USER 65532:65532 | ||
|
||
COPY manifests manifests | ||
|
||
ENV cloudDomain="127.0.0.1.nip.io" | ||
ENV cloudPort="" | ||
|
||
CMD ["kubectl apply -f manifests"] |
21 changes: 21 additions & 0 deletions
21
frontend/plugins/kubepanel/deploy/menifests/appcr.yaml.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: app.sealos.io/v1 | ||
kind: App | ||
metadata: | ||
name: kubepanel | ||
namespace: app-system | ||
spec: | ||
data: | ||
desc: Kube Panel | ||
url: "https://kubepanel.{{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }}" | ||
icon: "https://kubepanel.{{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }}/logo.svg" | ||
i18n: | ||
zh: | ||
name: 资源监控 | ||
zh-Hans: | ||
name: 资源监控 | ||
menuData: | ||
helpDropDown: false | ||
nameColor: text-black | ||
name: Kube Panel | ||
type: iframe | ||
displayType: normal |
85 changes: 85 additions & 0 deletions
85
frontend/plugins/kubepanel/deploy/menifests/deploy.yaml.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
labels: | ||
app: kubepanel-frontend | ||
name: kubepanel-frontend | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: kubepanel-frontend-config | ||
namespace: kubepanel-frontend | ||
data: | ||
config.yaml: |- | ||
addr: :3000 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: kubepanel-frontend | ||
namespace: kubepanel-frontend | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: kubepanel-frontend | ||
strategy: | ||
type: RollingUpdate | ||
rollingUpdate: | ||
maxUnavailable: 25% | ||
maxSurge: 25% | ||
template: | ||
metadata: | ||
labels: | ||
app: kubepanel-frontend | ||
spec: | ||
serviceAccountName: cluster-version-reader | ||
containers: | ||
- name: kubepanel-frontend | ||
env: | ||
- name: SEALOS_DOMAIN | ||
value: {{ .cloudDomain }} | ||
- name: SEALOS_PORT | ||
value: "{{ if .cloudPort }}:{{ .cloudPort }}{{ end }}" | ||
securityContext: | ||
runAsNonRoot: true | ||
runAsUser: 1001 | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: | ||
- 'ALL' | ||
resources: | ||
limits: | ||
cpu: 1000m | ||
memory: 1024Mi | ||
requests: | ||
cpu: 10m | ||
memory: 128Mi | ||
# do not modify this image, it is used for CI/CD | ||
image: ghcr.io/labring/sealos-kubepanel-frontend:latest | ||
imagePullPolicy: Always | ||
volumeMounts: | ||
- name: kubepanel-frontend-volume | ||
mountPath: /config.yaml | ||
subPath: config.yaml | ||
volumes: | ||
- name: kubepanel-frontend-volume | ||
configMap: | ||
name: kubepanel-frontend-config | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app: kubepanel-frontend | ||
name: kubepanel-frontend | ||
namespace: kubepanel-frontend | ||
spec: | ||
ports: | ||
- name: http | ||
port: 3000 | ||
protocol: TCP | ||
targetPort: 3000 | ||
selector: | ||
app: kubepanel-frontend |
45 changes: 45 additions & 0 deletions
45
frontend/plugins/kubepanel/deploy/menifests/ingress.yaml.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Copyright © 2022 sealos. | ||
# | ||
# 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. | ||
|
||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
annotations: | ||
kubernetes.io/ingress.class: nginx | ||
nginx.ingress.kubernetes.io/configuration-snippet: | | ||
more_clear_headers "X-Frame-Options:"; | ||
more_set_headers "Content-Security-Policy: default-src * blob: data: *.{{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }} {{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }}; img-src * data: blob: resource: *.{{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }} {{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }}; connect-src * wss: blob: resource:; style-src 'self' 'unsafe-inline' blob: *.{{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }} {{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }} resource:; script-src 'self' 'unsafe-inline' 'unsafe-eval' blob: *.{{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }} {{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }} resource: *.baidu.com *.bdstatic.com; frame-src 'self' *.{{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }} {{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }} mailto: tel: weixin: mtt: *.baidu.com; frame-ancestors 'self' https://{{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }} https://*.{{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }}"; | ||
more_set_headers "X-Xss-Protection: 1; mode=block"; | ||
higress.io/response-header-control-remove: X-Frame-Options | ||
higress.io/response-header-control-update: | | ||
Content-Security-Policy "default-src * blob: data: *.{{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }} {{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }}; img-src * data: blob: resource: *.{{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }} {{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }}; connect-src * wss: blob: resource:; style-src 'self' 'unsafe-inline' blob: *.{{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }} {{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }} resource:; script-src 'self' 'unsafe-inline' 'unsafe-eval' blob: *.{{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }} {{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }} resource: *.baidu.com *.bdstatic.com; frame-src 'self' *.{{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }} {{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }} mailto: tel: weixin: mtt: *.baidu.com; frame-ancestors 'self' https://{{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }} https://*.{{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }}" | ||
X-Xss-Protection "1; mode=block" | ||
name: kubepanel-frontend | ||
namespace: kubepanel-frontend | ||
spec: | ||
rules: | ||
- host: kubepanel.{{ .cloudDomain }} | ||
http: | ||
paths: | ||
- pathType: Prefix | ||
path: / | ||
backend: | ||
service: | ||
name: kubepanel-frontend | ||
port: | ||
number: 3000 | ||
tls: | ||
- hosts: | ||
- kubepanel.{{ .cloudDomain }} | ||
secretName: {{ .certSecretName }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.