mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-04-05 20:06:25 +00:00
Compare commits
6 Commits
project-do
...
fix-redis
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
042cc98c34 | ||
|
|
9180896f54 | ||
|
|
b37071f05e | ||
|
|
c64c6b549b | ||
|
|
df47d2f4a6 | ||
|
|
c0aea5a106 |
@@ -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:v0.0.2 \
|
sudo docker run --name=matchbox -d --net=host ghcr.io/aenix-io/cozystack/matchbox:v1.6.4 \
|
||||||
-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${version}|g" README.md
|
sed -i "s|\(ghcr.io/aenix-io/cozystack/matchbox:\)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 "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,12 +24,13 @@ 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) \
|
||||||
--cache-from type=registry,ref=$(REGISTRY)/installer:$(TAG) \
|
--tag $(REGISTRY)/installer:$(TALOS_VERSION)-$(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:$(TAG)" > images/installer.tag
|
echo "$(REGISTRY)/installer:$(TALOS_VERSION)" > 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
|
||||||
@@ -43,12 +44,13 @@ 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) \
|
||||||
--cache-from type=registry,ref=$(REGISTRY)/matchbox:$(TAG) \
|
--tag $(REGISTRY)/matchbox:$(TALOS_VERSION)-$(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:$(TAG)" > images/matchbox.tag
|
echo "$(REGISTRY)/matchbox:$(TALOS_VERSION)" > images/matchbox.tag
|
||||||
|
|
||||||
assets: talos-iso
|
assets: talos-iso
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,15 @@
|
|||||||
|
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
|
||||||
@@ -18,7 +30,8 @@ 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 [ "/cozystack/scripts/installer.sh" ]
|
ENTRYPOINT ["/usr/bin/k8s-await-election", "/cozystack/scripts/installer.sh" ]
|
||||||
|
|||||||
@@ -41,8 +41,6 @@ spec:
|
|||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: cozystack
|
app: cozystack
|
||||||
strategy:
|
|
||||||
type: Recreate
|
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
@@ -58,6 +56,18 @@ 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,6 +646,20 @@ 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,6 +27,13 @@ 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
|
||||||
@@ -46,3 +53,7 @@ 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,11 +35,6 @@ 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