mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-03-20 15:41:10 +00:00
111
README.md
111
README.md
@@ -2,8 +2,21 @@
|
||||
|
||||
## Quick Start
|
||||
|
||||
Install dependicies:
|
||||
|
||||
- `docker`
|
||||
- `talosctl`
|
||||
- `dialog`
|
||||
- `nmap`
|
||||
- `make`
|
||||
- `yq`
|
||||
- `kubectl`
|
||||
- `helm`
|
||||
|
||||
### Netboot server
|
||||
|
||||
Write configuration:
|
||||
|
||||
```
|
||||
mkdir -p matchbox/assets matchbox/groups matchbox/profiles
|
||||
|
||||
@@ -43,6 +56,8 @@ cat > matchbox/profiles/default.json <<EOT
|
||||
EOT
|
||||
```
|
||||
|
||||
Start matchbox:
|
||||
|
||||
```
|
||||
sudo docker run --name=matchbox -d --net=host -v ${PWD}/matchbox:/var/lib/matchbox:Z quay.io/poseidon/matchbox:v0.10.0 \
|
||||
-address=:8080 \
|
||||
@@ -73,6 +88,7 @@ sudo docker run --name=dnsmasq -d --cap-add=NET_ADMIN --net=host quay.io/poseido
|
||||
--log-dhcp
|
||||
```
|
||||
|
||||
Check status of containers:
|
||||
```
|
||||
docker ps
|
||||
# CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
@@ -80,4 +96,99 @@ docker ps
|
||||
# d256b46ab9e9 quay.io/poseidon/matchbox:v0.10.0 "/matchbox -address=…" 43 seconds ago Up 42 seconds matchbox
|
||||
```
|
||||
|
||||
### Bootstrap cluster
|
||||
|
||||
Write configuration for Cozystack:
|
||||
|
||||
```yaml
|
||||
cat > patch.yaml <<EOT
|
||||
machine:
|
||||
kernel:
|
||||
modules:
|
||||
- name: drbd
|
||||
parameters:
|
||||
- usermode_helper=disabled
|
||||
- name: openvswitch
|
||||
install:
|
||||
image: ghcr.io/siderolabs/installer:v1.6.0
|
||||
extensions:
|
||||
- image: ghcr.io/siderolabs/drbd:9.2.6-v1.6.0
|
||||
|
||||
cluster:
|
||||
network:
|
||||
cni:
|
||||
name: none
|
||||
podSubnets:
|
||||
- 10.244.0.0/16
|
||||
serviceSubnets:
|
||||
- 10.96.0.0/16
|
||||
|
||||
allowSchedulingOnControlPlanes: true
|
||||
controllerManager:
|
||||
extraArgs:
|
||||
bind-address: 0.0.0.0
|
||||
scheduler:
|
||||
extraArgs:
|
||||
bind-address: 0.0.0.0
|
||||
proxy:
|
||||
disabled: true
|
||||
discovery:
|
||||
enabled: false
|
||||
EOT
|
||||
```
|
||||
|
||||
Run [talos-bootstrap](https://github.com/aenix-io/talos-bootstrap/) to deploy cluster
|
||||
|
||||
|
||||
### Install Cozystack
|
||||
|
||||
Install cozystack system components:
|
||||
|
||||
```
|
||||
export KUBECONFIG=${PWD}/kubeconfig
|
||||
for i in \
|
||||
cilium \
|
||||
kubeovn \
|
||||
fluxcd \
|
||||
cert-manager \
|
||||
victoria-metrics-operator \
|
||||
monitoring \
|
||||
kubeapps \
|
||||
kubevirt \
|
||||
metallb \
|
||||
grafana-operator \
|
||||
mariadb-operator \
|
||||
postgres-operator \
|
||||
rabbitmq-operator \
|
||||
piraeus-operator \
|
||||
redis-operator \
|
||||
linstor \
|
||||
telepresence \
|
||||
ingress-nginx \
|
||||
do
|
||||
make -C "system/$i" apply
|
||||
done
|
||||
```
|
||||
|
||||
Check status of deployments:
|
||||
```
|
||||
helm ls -A
|
||||
# NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
|
||||
# cert-manager cozy-cert-manager 1 2023-12-26 17:59:53.360566717 +0000 UTC deployed cozystack-0.0.0
|
||||
# cilium cozy-cilium 1 2023-12-26 17:58:13.257363562 +0000 UTC deployed cozystack-0.0.0
|
||||
# grafana-operator cozy-grafana-operator 1 2023-12-26 18:00:27.040639056 +0000 UTC deployed cozystack-0.0.0
|
||||
# ingress-nginx cozy-ingress-nginx 1 2023-12-26 18:00:47.628341874 +0000 UTC deployed cozystack-0.0.0
|
||||
# kubeapps cozy-kubeapps 1 2023-12-26 18:00:17.955946393 +0000 UTC deployed cozystack-0.0.0
|
||||
# kubeapps cozy-fluxcd 1 2023-12-26 17:59:43.916449245 +0000 UTC deployed cozystack-0.0.0
|
||||
# kubevirt cozy-kubevirt 1 2023-12-26 18:00:20.417334537 +0000 UTC deployed cozystack-0.0.0
|
||||
# linstor cozy-linstor 1 2023-12-26 18:00:40.858381945 +0000 UTC deployed cozystack-0.0.0
|
||||
# mariadb-operator cozy-mariadb-operator 1 2023-12-26 18:00:30.598967718 +0000 UTC deployed cozystack-0.0.0
|
||||
# metallb cozy-metallb 1 2023-12-26 18:00:24.001145931 +0000 UTC deployed cozystack-0.0.0
|
||||
# monitoring cozy-monitoring 1 2023-12-26 18:00:15.97255153 +0000 UTC deployed cozystack-0.0.0
|
||||
# piraeus-operator cozy-linstor 1 2023-12-26 18:00:37.914192412 +0000 UTC deployed cozystack-0.0.0
|
||||
# postgres-operator cozy-postgres-operator 1 2023-12-26 18:00:33.457111594 +0000 UTC deployed cozystack-0.0.0
|
||||
# rabbitmq-operator cozy-rabbitmq-operator 1 2023-12-26 18:00:35.830732116 +0000 UTC deployed cozystack-0.0.0
|
||||
# redis-operator cozy-redis-operator 1 2023-12-26 18:00:40.151932075 +0000 UTC deployed cozystack-0.0.0
|
||||
# traffic-manager cozy-telepresence 1 2023-12-26 18:00:46.364632248 +0000 UTC deployed cozystack-0.0.0
|
||||
# victoria-metrics-operator cozy-victoria-metrics-operator 1 2023-12-26 18:00:13.636953818 +0000 UTC deployed cozystack-0.0.0
|
||||
```
|
||||
|
||||
1
TODO
1
TODO
@@ -13,3 +13,4 @@ talos setup via tcp-proxy
|
||||
migrate kubeapps redis to operator
|
||||
kubeapps patch helm chart to use custom images
|
||||
flux policies
|
||||
talos linux firmware
|
||||
|
||||
23
apps/monitoring-hub/.helmignore
Normal file
23
apps/monitoring-hub/.helmignore
Normal file
@@ -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/
|
||||
25
apps/monitoring-hub/Chart.yaml
Normal file
25
apps/monitoring-hub/Chart.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
apiVersion: v2
|
||||
name: monitoring-gateway
|
||||
description: Monitoring and observability stack.
|
||||
icon: https://upload.wikimedia.org/wikipedia/commons/thumb/3/3b/Grafana_icon.svg/351px-Grafana_icon.svg.png
|
||||
|
||||
# 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"
|
||||
22
apps/monitoring-hub/templates/NOTES.txt
Normal file
22
apps/monitoring-hub/templates/NOTES.txt
Normal file
@@ -0,0 +1,22 @@
|
||||
1. Get the application URL by running these commands:
|
||||
{{- if .Values.ingress.enabled }}
|
||||
{{- range $host := .Values.ingress.hosts }}
|
||||
{{- range .paths }}
|
||||
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- else if contains "NodePort" .Values.service.type }}
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "monitoring-gateway.fullname" . }})
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
echo http://$NODE_IP:$NODE_PORT
|
||||
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "monitoring-gateway.fullname" . }}'
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "monitoring-gateway.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||
echo http://$SERVICE_IP:{{ .Values.service.port }}
|
||||
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "monitoring-gateway.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
|
||||
echo "Visit http://127.0.0.1:8080 to use your application"
|
||||
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
|
||||
{{- end }}
|
||||
51
apps/monitoring-hub/templates/_helpers.tpl
Normal file
51
apps/monitoring-hub/templates/_helpers.tpl
Normal file
@@ -0,0 +1,51 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "monitoring-gateway.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "monitoring-gateway.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||
{{- if contains $name .Release.Name }}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "monitoring-gateway.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "monitoring-gateway.labels" -}}
|
||||
helm.sh/chart: {{ include "monitoring-gateway.chart" . }}
|
||||
{{ include "monitoring-gateway.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "monitoring-gateway.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "monitoring-gateway.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
72
apps/monitoring-hub/templates/deployment.yaml
Normal file
72
apps/monitoring-hub/templates/deployment.yaml
Normal file
@@ -0,0 +1,72 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "monitoring-gateway.fullname" . }}
|
||||
labels:
|
||||
{{- include "monitoring-gateway.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if not .Values.autoscaling.enabled }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "monitoring-gateway.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "monitoring-gateway.labels" . | nindent 8 }}
|
||||
{{- with .Values.podLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "monitoring-gateway.serviceAccountName" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.service.port }}
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
{{- with .Values.volumeMounts }}
|
||||
volumeMounts:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.volumes }}
|
||||
volumes:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
32
apps/monitoring-hub/templates/hpa.yaml
Normal file
32
apps/monitoring-hub/templates/hpa.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
{{- if .Values.autoscaling.enabled }}
|
||||
apiVersion: autoscaling/v2
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ include "monitoring-gateway.fullname" . }}
|
||||
labels:
|
||||
{{- include "monitoring-gateway.labels" . | nindent 4 }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ include "monitoring-gateway.fullname" . }}
|
||||
minReplicas: {{ .Values.autoscaling.minReplicas }}
|
||||
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
|
||||
metrics:
|
||||
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
61
apps/monitoring-hub/templates/ingress.yaml
Normal file
61
apps/monitoring-hub/templates/ingress.yaml
Normal file
@@ -0,0 +1,61 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $fullName := include "monitoring-gateway.fullname" . -}}
|
||||
{{- $svcPort := .Values.service.port -}}
|
||||
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
|
||||
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
|
||||
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
{{- else -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
{{- end }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $fullName }}
|
||||
labels:
|
||||
{{- include "monitoring-gateway.labels" . | nindent 4 }}
|
||||
{{- with .Values.ingress.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
|
||||
ingressClassName: {{ .Values.ingress.className }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
{{- range .Values.ingress.tls }}
|
||||
- hosts:
|
||||
{{- range .hosts }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
secretName: {{ .secretName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ .host | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
- path: {{ .path }}
|
||||
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
|
||||
pathType: {{ .pathType }}
|
||||
{{- end }}
|
||||
backend:
|
||||
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
|
||||
service:
|
||||
name: {{ $fullName }}
|
||||
port:
|
||||
number: {{ $svcPort }}
|
||||
{{- else }}
|
||||
serviceName: {{ $fullName }}
|
||||
servicePort: {{ $svcPort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
15
apps/monitoring-hub/templates/service.yaml
Normal file
15
apps/monitoring-hub/templates/service.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "monitoring-gateway.fullname" . }}
|
||||
labels:
|
||||
{{- include "monitoring-gateway.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.service.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
{{- include "monitoring-gateway.selectorLabels" . | nindent 4 }}
|
||||
13
apps/monitoring-hub/templates/serviceaccount.yaml
Normal file
13
apps/monitoring-hub/templates/serviceaccount.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "monitoring-gateway.serviceAccountName" . }}
|
||||
labels:
|
||||
{{- include "monitoring-gateway.labels" . | nindent 4 }}
|
||||
{{- with .Values.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
automountServiceAccountToken: {{ .Values.serviceAccount.automount }}
|
||||
{{- end }}
|
||||
15
apps/monitoring-hub/templates/tests/test-connection.yaml
Normal file
15
apps/monitoring-hub/templates/tests/test-connection.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: "{{ include "monitoring-gateway.fullname" . }}-test-connection"
|
||||
labels:
|
||||
{{- include "monitoring-gateway.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
"helm.sh/hook": test
|
||||
spec:
|
||||
containers:
|
||||
- name: wget
|
||||
image: busybox
|
||||
command: ['wget']
|
||||
args: ['{{ include "monitoring-gateway.fullname" . }}:{{ .Values.service.port }}']
|
||||
restartPolicy: Never
|
||||
98
apps/monitoring-hub/values.yaml
Normal file
98
apps/monitoring-hub/values.yaml
Normal file
@@ -0,0 +1,98 @@
|
||||
# Default values for monitoring-hub.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: nginx
|
||||
pullPolicy: IfNotPresent
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: ""
|
||||
|
||||
imagePullSecrets: []
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
||||
serviceAccount:
|
||||
# Specifies whether a service account should be created
|
||||
create: true
|
||||
# Automatically mount a ServiceAccount's API credentials?
|
||||
automount: true
|
||||
# Annotations to add to the service account
|
||||
annotations: {}
|
||||
# The name of the service account to use.
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name: ""
|
||||
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
|
||||
podSecurityContext: {}
|
||||
# fsGroup: 2000
|
||||
|
||||
securityContext: {}
|
||||
# capabilities:
|
||||
# drop:
|
||||
# - ALL
|
||||
# readOnlyRootFilesystem: true
|
||||
# runAsNonRoot: true
|
||||
# runAsUser: 1000
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 80
|
||||
|
||||
ingress:
|
||||
enabled: false
|
||||
className: ""
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: "true"
|
||||
hosts:
|
||||
- host: chart-example.local
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
tls: []
|
||||
# - secretName: chart-example-tls
|
||||
# hosts:
|
||||
# - chart-example.local
|
||||
|
||||
resources: {}
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
autoscaling:
|
||||
enabled: false
|
||||
minReplicas: 1
|
||||
maxReplicas: 100
|
||||
targetCPUUtilizationPercentage: 80
|
||||
# targetMemoryUtilizationPercentage: 80
|
||||
|
||||
# Additional volumes on the output Deployment definition.
|
||||
volumes: []
|
||||
# - name: foo
|
||||
# secret:
|
||||
# secretName: mysecret
|
||||
# optional: false
|
||||
|
||||
# Additional volumeMounts on the output Deployment definition.
|
||||
volumeMounts: []
|
||||
# - name: foo
|
||||
# mountPath: "/etc/foo"
|
||||
# readOnly: true
|
||||
|
||||
nodeSelector: {}
|
||||
|
||||
tolerations: []
|
||||
|
||||
affinity: {}
|
||||
@@ -1,2 +1,2 @@
|
||||
name: app
|
||||
name: cozystack
|
||||
version: 0.0.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: app
|
||||
name: cozystack
|
||||
version: 0.0.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: app
|
||||
name: cozystack
|
||||
version: 0.0.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: app
|
||||
name: cozystack
|
||||
version: 0.0.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: app
|
||||
name: cozystack
|
||||
version: 0.0.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: app
|
||||
name: cozystack
|
||||
version: 0.0.0
|
||||
|
||||
@@ -5,6 +5,7 @@ update:
|
||||
sed -i '/path:/ s|/etc/origin/|/var/lib/|' install.sh
|
||||
sed -i '/mountPath:/ s|/usr/local/bin|/opt/bin|' install.sh
|
||||
sed -i 's/kube-system/cozy-kubeovn/g' install.sh
|
||||
sed -i '/deployment\/coredns/,$$d' install.sh
|
||||
|
||||
apply:
|
||||
kubectl get ns cozy-kubeovn >/dev/null 2>&1 || kubectl create namespace cozy-kubeovn
|
||||
|
||||
@@ -47,7 +47,7 @@ CNI_BIN_DIR="/opt/cni/bin"
|
||||
|
||||
REGISTRY="docker.io/kubeovn"
|
||||
VPC_NAT_IMAGE="vpc-nat-gateway"
|
||||
VERSION="v1.12.3"
|
||||
VERSION="v1.12.4"
|
||||
IMAGE_PULL_POLICY="IfNotPresent"
|
||||
POD_CIDR="10.244.0.0/16" # Do NOT overlap with NODE/SVC/JOIN CIDR
|
||||
POD_GATEWAY="10.244.0.1"
|
||||
@@ -2254,6 +2254,10 @@ spec:
|
||||
- 253 # default
|
||||
- 254 # main
|
||||
- 255 # local
|
||||
mtu:
|
||||
type: integer
|
||||
minimum: 68
|
||||
maximum: 65535
|
||||
private:
|
||||
type: boolean
|
||||
vlan:
|
||||
@@ -3922,6 +3926,15 @@ spec:
|
||||
- key: CriticalAddonsOnly
|
||||
operator: Exists
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- preference:
|
||||
matchExpressions:
|
||||
- key: "ovn.kubernetes.io/ic-gw"
|
||||
operator: NotIn
|
||||
values:
|
||||
- "true"
|
||||
weight: 100
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
@@ -4022,6 +4035,7 @@ spec:
|
||||
memory: 1Gi
|
||||
nodeSelector:
|
||||
kubernetes.io/os: "linux"
|
||||
kube-ovn/role: master
|
||||
volumes:
|
||||
- name: localtime
|
||||
hostPath:
|
||||
@@ -4444,22 +4458,22 @@ spec:
|
||||
name: kube-ovn-tls
|
||||
- mountPath: /var/log/kube-ovn
|
||||
name: kube-ovn-log
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- cat
|
||||
- /var/run/ovn/ovn-controller.pid
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 45
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- cat
|
||||
- /var/run/ovn/ovn-controller.pid
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
failureThreshold: 5
|
||||
timeoutSeconds: 45
|
||||
periodSeconds: 7
|
||||
successThreshold: 1
|
||||
tcpSocket:
|
||||
port: 10661
|
||||
timeoutSeconds: 3
|
||||
readinessProbe:
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 7
|
||||
successThreshold: 1
|
||||
tcpSocket:
|
||||
port: 10661
|
||||
timeoutSeconds: 3
|
||||
nodeSelector:
|
||||
kubernetes.io/os: "linux"
|
||||
kube-ovn/role: "master"
|
||||
@@ -4567,54 +4581,3 @@ for ns in $(kubectl get ns --no-headers -o custom-columns=NAME:.metadata.name);
|
||||
done
|
||||
|
||||
kubectl rollout status daemonset/kube-ovn-pinger -n cozy-kubeovn --timeout 300s
|
||||
kubectl rollout status deployment/coredns -n cozy-kubeovn --timeout 600s
|
||||
echo "-------------------------------"
|
||||
echo ""
|
||||
|
||||
echo "[Step 5/6] Add kubectl plugin PATH"
|
||||
|
||||
if ! sh -c "echo \":$PATH:\" | grep -q \":/usr/local/bin:\""; then
|
||||
echo "Tips:Please join the /usr/local/bin to your PATH. Temporarily, we do it for this execution."
|
||||
export PATH=/usr/local/bin:$PATH
|
||||
echo "-------------------------------"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
echo "[Step 6/6] Run network diagnose"
|
||||
kubectl cp cozy-kubeovn/"$(kubectl -n cozy-kubeovn get pods -o wide | grep cni | awk '{print $1}' | awk 'NR==1{print}')":/kube-ovn/kubectl-ko /usr/local/bin/kubectl-ko
|
||||
chmod +x /usr/local/bin/kubectl-ko
|
||||
kubectl ko diagnose all
|
||||
|
||||
echo "-------------------------------"
|
||||
echo "
|
||||
,,,,
|
||||
,::,
|
||||
,,::,,,,
|
||||
,,,,,::::::::::::,,,,,
|
||||
,,,::::::::::::::::::::::,,,
|
||||
,,::::::::::::::::::::::::::::,,
|
||||
,,::::::::::::::::::::::::::::::::,,
|
||||
,::::::::::::::::::::::::::::::::::::,
|
||||
,:::::::::::::,, ,,:::::,,,::::::::::,
|
||||
,,:::::::::::::, ,::, ,:::::::::,
|
||||
,:::::::::::::, :x, ,:: :, ,:::::::::,
|
||||
,:::::::::::::::, ,,, ,::, ,, ,::::::::::,
|
||||
,:::::::::::::::::,,,,,,:::::,,,,::::::::::::, ,:, ,:, ,xx, ,:::::, ,:, ,:: :::, ,x
|
||||
,::::::::::::::::::::::::::::::::::::::::::::, :x: ,:xx: , :xx, :xxxxxxxxx, :xx, ,xx:,xxxx, :x
|
||||
,::::::::::::::::::::::::::::::::::::::::::::, :xxxxx:, ,xx, :x: :xxx:x::, ::xxxx: :xx:, ,:xxx :xx, ,xx: ,xxxxx:, :x
|
||||
,::::::::::::::::::::::::::::::::::::::::::::, :xxxxx, :xx, :x: :xxx,,:xx,:xx:,:xx, ,,,,,,,,,xxx, ,xx: :xx:xx: ,xxx,:xx::x
|
||||
,::::::,,::::::::,,::::::::,,:::::::,,,::::::, :x:,xxx: ,xx, :xx :xx: ,xx,xxxxxx:, ,xxxxxxx:,xxx:, ,xxx, :xxx: ,xxx, :xxxx
|
||||
,::::, ,::::, ,:::::, ,,::::, ,::::, :x: ,:xx,,:xx::xxxx,,xxx::xx: :xx::::x: ,,,,,, ,xxxxxxxxx, ,xx: ,xxx, :xxx
|
||||
,::::, ,::::, ,::::, ,::::, ,::::, ,:, ,:, ,,::,,:, ,::::,, ,:::::, ,,:::::, ,, :x: ,::
|
||||
,::::, ,::::, ,::::, ,::::, ,::::,
|
||||
,,,,, ,::::, ,::::, ,::::, ,:::, ,,,,,,,,,,,,,
|
||||
,::::, ,::::, ,::::, ,:::, ,,,:::::::::::::::,
|
||||
,::::, ,::::, ,::::, ,::::, ,,,,:::::::::,,,,,,,:::,
|
||||
,::::, ,::::, ,::::, ,::::::::::::,,,,,
|
||||
,,,, ,::::, ,,,, ,,,::::,,,,
|
||||
,::::,
|
||||
,,::,
|
||||
"
|
||||
echo "Thanks for choosing Kube-OVN!
|
||||
For more advanced features, please read https://kubeovn.github.io/docs/stable/en/
|
||||
If you have any question, please file an issue https://github.com/kubeovn/kube-ovn/issues/new/choose"
|
||||
|
||||
2
system/kubevirt/Chart.yaml
Normal file
2
system/kubevirt/Chart.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
name: cozystack
|
||||
version: 0.0.0
|
||||
14
system/kubevirt/templates/kubevirt-cr.yaml
Normal file
14
system/kubevirt/templates/kubevirt-cr.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
apiVersion: kubevirt.io/v1
|
||||
kind: KubeVirt
|
||||
metadata:
|
||||
name: kubevirt
|
||||
namespace: cozy-kubevirt
|
||||
spec:
|
||||
certificateRotateStrategy: {}
|
||||
configuration:
|
||||
developerConfiguration:
|
||||
featureGates: []
|
||||
customizeComponents: {}
|
||||
imagePullPolicy: IfNotPresent
|
||||
workloadUpdateStrategy: {}
|
||||
7501
system/kubevirt/templates/kubevirt-operator.yaml
Normal file
7501
system/kubevirt/templates/kubevirt-operator.yaml
Normal file
File diff suppressed because it is too large
Load Diff
6
system/kubevirt/values.yaml
Normal file
6
system/kubevirt/values.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
_helm:
|
||||
name: kubevirt
|
||||
namespace: cozy-kubevirt
|
||||
createNamespace: true
|
||||
privilegedNamespace: true
|
||||
crds: CreateReplace
|
||||
@@ -1,2 +1,2 @@
|
||||
name: app
|
||||
name: cozystack
|
||||
version: 0.0.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: app
|
||||
name: cozystack
|
||||
version: 0.0.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: app
|
||||
name: cozystack
|
||||
version: 0.0.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: app
|
||||
name: cozystack
|
||||
version: 0.0.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: app
|
||||
name: cozystack
|
||||
version: 0.0.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: app
|
||||
name: cozystack
|
||||
version: 0.0.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: app
|
||||
name: cozystack
|
||||
version: 0.0.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: app
|
||||
name: cozystack
|
||||
version: 0.0.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: app
|
||||
name: cozystack
|
||||
version: 0.0.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: app
|
||||
name: cozystack
|
||||
version: 0.0.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: app
|
||||
name: cozystack
|
||||
version: 0.0.0
|
||||
|
||||
Reference in New Issue
Block a user