mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-04-07 07:06:15 +00:00
Compare commits
1 Commits
fix-redis
...
project-do
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
236f3ce92f |
@@ -99,7 +99,7 @@ Any Linux system installed on it (eg. Ubuntu should be enough)
|
|||||||
Start matchbox with prebuilt Talos image for Cozystack:
|
Start matchbox with prebuilt Talos image for Cozystack:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo docker run --name=matchbox -d --net=host ghcr.io/aenix-io/cozystack/matchbox:v1.6.4 \
|
sudo docker run --name=matchbox -d --net=host ghcr.io/aenix-io/cozystack/matchbox:v0.0.2 \
|
||||||
-address=:8080 \
|
-address=:8080 \
|
||||||
-log-level=debug
|
-log-level=debug
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ talos_version=$(awk '/^version:/ {print $2}' packages/core/installer/images/talo
|
|||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
sed -i "s|\(ghcr.io/aenix-io/cozystack/matchbox:\)v[^ ]\+|\1${talos_version}|g" README.md
|
sed -i "s|\(ghcr.io/aenix-io/cozystack/matchbox:\)v[^ ]\+|\1${version}|g" README.md
|
||||||
sed -i "s|\(ghcr.io/aenix-io/cozystack/talos:\)v[^ ]\+|\1${talos_version}|g" README.md
|
sed -i "s|\(ghcr.io/aenix-io/cozystack/talos:\)v[^ ]\+|\1${talos_version}|g" README.md
|
||||||
|
|
||||||
sed -i "/^TAG / s|=.*|= ${version}|" \
|
sed -i "/^TAG / s|=.*|= ${version}|" \
|
||||||
|
|||||||
@@ -24,13 +24,12 @@ image-installer:
|
|||||||
docker buildx build -f images/installer/Dockerfile ../../.. \
|
docker buildx build -f images/installer/Dockerfile ../../.. \
|
||||||
--provenance false \
|
--provenance false \
|
||||||
--tag $(REGISTRY)/installer:$(TAG) \
|
--tag $(REGISTRY)/installer:$(TAG) \
|
||||||
--tag $(REGISTRY)/installer:$(TALOS_VERSION)-$(TAG) \
|
--cache-from type=registry,ref=$(REGISTRY)/installer:$(TAG) \
|
||||||
--cache-from type=registry,ref=$(REGISTRY)/installer:$(TALOS_VERSION) \
|
|
||||||
--cache-to type=inline \
|
--cache-to type=inline \
|
||||||
--metadata-file images/installer.json \
|
--metadata-file images/installer.json \
|
||||||
--push=$(PUSH) \
|
--push=$(PUSH) \
|
||||||
--load=$(LOAD)
|
--load=$(LOAD)
|
||||||
echo "$(REGISTRY)/installer:$(TALOS_VERSION)" > images/installer.tag
|
echo "$(REGISTRY)/installer:$(TAG)" > images/installer.tag
|
||||||
|
|
||||||
image-talos:
|
image-talos:
|
||||||
test -f ../../../_out/assets/installer-amd64.tar || make talos-installer
|
test -f ../../../_out/assets/installer-amd64.tar || make talos-installer
|
||||||
@@ -44,13 +43,12 @@ image-matchbox:
|
|||||||
docker buildx build -f images/matchbox/Dockerfile ../../.. \
|
docker buildx build -f images/matchbox/Dockerfile ../../.. \
|
||||||
--provenance false \
|
--provenance false \
|
||||||
--tag $(REGISTRY)/matchbox:$(TAG) \
|
--tag $(REGISTRY)/matchbox:$(TAG) \
|
||||||
--tag $(REGISTRY)/matchbox:$(TALOS_VERSION)-$(TAG) \
|
--cache-from type=registry,ref=$(REGISTRY)/matchbox:$(TAG) \
|
||||||
--cache-from type=registry,ref=$(REGISTRY)/matchbox:$(TALOS_VERSION) \
|
|
||||||
--cache-to type=inline \
|
--cache-to type=inline \
|
||||||
--metadata-file images/matchbox.json \
|
--metadata-file images/matchbox.json \
|
||||||
--push=$(PUSH) \
|
--push=$(PUSH) \
|
||||||
--load=$(LOAD)
|
--load=$(LOAD)
|
||||||
echo "$(REGISTRY)/matchbox:$(TALOS_VERSION)" > images/matchbox.tag
|
echo "$(REGISTRY)/matchbox:$(TAG)" > images/matchbox.tag
|
||||||
|
|
||||||
assets: talos-iso
|
assets: talos-iso
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,3 @@
|
|||||||
FROM golang:alpine3.19 as k8s-await-election-builder
|
|
||||||
|
|
||||||
ARG K8S_AWAIT_ELECTION_GITREPO=https://github.com/LINBIT/k8s-await-election
|
|
||||||
ARG K8S_AWAIT_ELECTION_VERSION=0.4.1
|
|
||||||
|
|
||||||
RUN apk add --no-cache git make
|
|
||||||
RUN git clone ${K8S_AWAIT_ELECTION_GITREPO} /usr/local/go/k8s-await-election/ \
|
|
||||||
&& cd /usr/local/go/k8s-await-election \
|
|
||||||
&& git reset --hard v${K8S_AWAIT_ELECTION_VERSION} \
|
|
||||||
&& make \
|
|
||||||
&& mv ./out/k8s-await-election-amd64 /k8s-await-election
|
|
||||||
|
|
||||||
FROM alpine:3.19 AS builder
|
FROM alpine:3.19 AS builder
|
||||||
|
|
||||||
RUN apk add --no-cache make git
|
RUN apk add --no-cache make git
|
||||||
@@ -30,8 +18,7 @@ COPY scripts /cozystack/scripts
|
|||||||
COPY --from=builder /src/packages/core /cozystack/packages/core
|
COPY --from=builder /src/packages/core /cozystack/packages/core
|
||||||
COPY --from=builder /src/packages/system /cozystack/packages/system
|
COPY --from=builder /src/packages/system /cozystack/packages/system
|
||||||
COPY --from=builder /src/_out/repos /cozystack/assets/repos
|
COPY --from=builder /src/_out/repos /cozystack/assets/repos
|
||||||
COPY --from=k8s-await-election-builder /k8s-await-election /usr/bin/k8s-await-election
|
|
||||||
COPY dashboards /cozystack/assets/dashboards
|
COPY dashboards /cozystack/assets/dashboards
|
||||||
|
|
||||||
WORKDIR /cozystack
|
WORKDIR /cozystack
|
||||||
ENTRYPOINT ["/usr/bin/k8s-await-election", "/cozystack/scripts/installer.sh" ]
|
ENTRYPOINT [ "/cozystack/scripts/installer.sh" ]
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ spec:
|
|||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: cozystack
|
app: cozystack
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
@@ -56,18 +58,6 @@ spec:
|
|||||||
value: localhost
|
value: localhost
|
||||||
- name: KUBERNETES_SERVICE_PORT
|
- name: KUBERNETES_SERVICE_PORT
|
||||||
value: "7445"
|
value: "7445"
|
||||||
- name: K8S_AWAIT_ELECTION_ENABLED
|
|
||||||
value: "1"
|
|
||||||
- name: K8S_AWAIT_ELECTION_NAME
|
|
||||||
value: cozystack
|
|
||||||
- name: K8S_AWAIT_ELECTION_LOCK_NAME
|
|
||||||
value: cozystack
|
|
||||||
- name: K8S_AWAIT_ELECTION_LOCK_NAMESPACE
|
|
||||||
value: cozy-system
|
|
||||||
- name: K8S_AWAIT_ELECTION_IDENTITY
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
fieldPath: metadata.name
|
|
||||||
- name: darkhttpd
|
- name: darkhttpd
|
||||||
image: "{{ .Files.Get "images/installer.tag" | trim }}@{{ index (.Files.Get "images/installer.json" | fromJson) "containerimage.digest" }}"
|
image: "{{ .Files.Get "images/installer.tag" | trim }}@{{ index (.Files.Get "images/installer.json" | fromJson) "containerimage.digest" }}"
|
||||||
command:
|
command:
|
||||||
|
|||||||
@@ -646,20 +646,6 @@ spec:
|
|||||||
namespace: cozy-cilium
|
namespace: cozy-cilium
|
||||||
- name: kubeovn
|
- name: kubeovn
|
||||||
namespace: cozy-kubeovn
|
namespace: cozy-kubeovn
|
||||||
{{- if .Capabilities.APIVersions.Has "source.toolkit.fluxcd.io/v1beta2" }}
|
|
||||||
{{- with (lookup "source.toolkit.fluxcd.io/v1beta2" "HelmRepository" "cozy-public" "").items }}
|
|
||||||
values:
|
|
||||||
kubeapps:
|
|
||||||
redis:
|
|
||||||
master:
|
|
||||||
podAnnotations:
|
|
||||||
{{- range $index, $repo := . }}
|
|
||||||
{{- with (($repo.status).artifact).revision }}
|
|
||||||
repository.cozystack.io/{{ $repo.metadata.name }}: {{ quote . }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
---
|
---
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2beta1
|
apiVersion: helm.toolkit.fluxcd.io/v2beta1
|
||||||
kind: HelmRelease
|
kind: HelmRelease
|
||||||
|
|||||||
@@ -27,13 +27,6 @@ spec:
|
|||||||
$patch: delete
|
$patch: delete
|
||||||
- name: drbd-module-loader
|
- name: drbd-module-loader
|
||||||
$patch: delete
|
$patch: delete
|
||||||
containers:
|
|
||||||
- name: linstor-satellite
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /run
|
|
||||||
name: host-run
|
|
||||||
securityContext:
|
|
||||||
readOnlyRootFilesystem: false
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: run-systemd-system
|
- name: run-systemd-system
|
||||||
$patch: delete
|
$patch: delete
|
||||||
@@ -53,7 +46,3 @@ spec:
|
|||||||
hostPath:
|
hostPath:
|
||||||
path: /var/etc/lvm/archive
|
path: /var/etc/lvm/archive
|
||||||
type: DirectoryOrCreate
|
type: DirectoryOrCreate
|
||||||
- name: host-run
|
|
||||||
hostPath:
|
|
||||||
path: /run
|
|
||||||
type: DirectoryOrCreate
|
|
||||||
|
|||||||
@@ -35,6 +35,11 @@ kubectl annotate helmrepositories.source.toolkit.fluxcd.io -A -l cozystack.io/re
|
|||||||
# Install platform chart
|
# Install platform chart
|
||||||
make -C packages/core/platform apply
|
make -C packages/core/platform apply
|
||||||
|
|
||||||
|
# Flush kubeapps cache
|
||||||
|
if kubectl wait --for=condition=ready -n cozy-dashboard pod/dashboard-redis-master-0 --timeout=1s; then
|
||||||
|
kubectl exec -ti -n cozy-dashboard dashboard-redis-master-0 -- sh -c 'redis-cli -a "$REDIS_PASSWORD" flushdb'
|
||||||
|
fi
|
||||||
|
|
||||||
# Reconcile platform chart
|
# Reconcile platform chart
|
||||||
trap 'exit' INT TERM
|
trap 'exit' INT TERM
|
||||||
while true; do
|
while true; do
|
||||||
|
|||||||
Reference in New Issue
Block a user