Skip to content

Commit 0ffcbed

Browse files
authored
Merge pull request #5 from kingdon-ci/break-it
Break it
2 parents 61967c4 + 3690937 commit 0ffcbed

13 files changed

+99
-53
lines changed

.github/workflows/deploy.yml

+36-35
Original file line numberDiff line numberDiff line change
@@ -64,50 +64,51 @@ jobs:
6464
rm -r flux/use-cases flux/guides flux/monitoring flux/migration
6565
rm -rf flux/gitops-toolkit img/screens shortcode-gallery img/*.png
6666
rm -r flux/cheatsheets # Get us below 200 (https://github.com/spinkube/containerd-shim-spin/issues/28)
67+
rm -r favicons contributing/docs
6768
popd
6869
6970
- name: Install Spin
7071
uses: fermyon/actions/spin/setup@v1
7172

7273
# Push: WASM
73-
- name: Push to OCI
74-
id: push
75-
uses: fermyon/actions/spin/push@v1
76-
with:
77-
registry: ghcr.io
78-
registry_username: ${{ github.actor }}
79-
registry_password: ${{ secrets.GITHUB_TOKEN }}
80-
registry_reference: "ghcr.io/kingdon-ci/flux-docs/build:${{ github.run_id }}-2"
81-
manifest_file: spin.toml
82-
83-
# Push: Docker WASM (alternate while spin registry push cannot be used)
84-
# - name: Set up QEMU
85-
# uses: docker/setup-qemu-action@v3
86-
# - name: setup buildx
87-
# uses: docker/setup-buildx-action@v3
88-
# - name: login to GitHub container registry
89-
# uses: docker/login-action@v3
74+
# - name: Push to OCI
75+
# id: push
76+
# uses: fermyon/actions/spin/push@v1
9077
# with:
9178
# registry: ghcr.io
92-
# username: ${{ github.actor }}
93-
# password: ${{ secrets.GITHUB_TOKEN }}
79+
# registry_username: ${{ github.actor }}
80+
# registry_password: ${{ secrets.GITHUB_TOKEN }}
81+
# registry_reference: "ghcr.io/kingdon-ci/flux-docs/build:${{ github.run_id }}-2"
82+
# manifest_file: spin.toml
83+
84+
# Push: Docker WASM (alternate while spin registry push cannot be used)
85+
- name: Set up QEMU
86+
uses: docker/setup-qemu-action@v3
87+
- name: setup buildx
88+
uses: docker/setup-buildx-action@v3
89+
- name: login to GitHub container registry
90+
uses: docker/login-action@v3
91+
with:
92+
registry: ghcr.io
93+
username: ${{ github.actor }}
94+
password: ${{ secrets.GITHUB_TOKEN }}
9495

95-
# - name: enable containerd image store
96-
# run: |
97-
# echo '{ "features": { "containerd-snapshotter": true } }' | sudo tee /etc/docker/daemon.json
98-
# sudo systemctl restart docker
96+
- name: enable containerd image store
97+
run: |
98+
echo '{ "features": { "containerd-snapshotter": true } }' | sudo tee /etc/docker/daemon.json
99+
sudo systemctl restart docker
99100
100101
# Copied from https://github.com/spinkube/containerd-shim-spin/blob/main/.github/workflows/docker-build-push.yaml
101-
# - name: build and push
102-
# uses: docker/build-push-action@v5
103-
# with:
104-
# push: true
105-
# tags: |
106-
# ghcr.io/kingdon-ci/flux-docs/build:${{ github.run_id }}-3
107-
# ghcr.io/kingdon-ci/flux-docs/build:latest
108-
# context: .
109-
# platforms: wasi/wasm
110-
# provenance: false
102+
- name: build and push
103+
uses: docker/build-push-action@v5
104+
with:
105+
push: true
106+
tags: |
107+
ghcr.io/kingdon-ci/flux-docs/build:${{ github.run_id }}-3
108+
ghcr.io/kingdon-ci/flux-docs/build:latest
109+
context: .
110+
platforms: wasi/wasm
111+
provenance: false
111112

112113
# Deploy:
113114
# - name: Deploy to Fermyon Cloud
@@ -123,7 +124,7 @@ jobs:
123124
- name: Set Image (Kustomize SpinApp)
124125
run: |
125126
pushd deploy/spin-app
126-
kustomize edit set image flux-docs/build=ghcr.io/kingdon-ci/flux-docs/build:${{ github.run_id }}-2
127+
kustomize edit set image flux-docs/build=ghcr.io/kingdon-ci/flux-docs/build:${{ github.run_id }}-3
127128
popd
128129
129130
# Login: GHCR
@@ -161,4 +162,4 @@ jobs:
161162
- name: Sign OCI WASM artifact
162163
run: |
163164
# keyless mode
164-
cosign sign ghcr.io/kingdon-ci/flux-docs/build:${{ github.run_id }}-2 -y
165+
cosign sign ghcr.io/kingdon-ci/flux-docs/build:${{ github.run_id }}-3 -y

Dockerfile

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# # FROM --platform=${BUILDPLATFORM}
2-
# FROM --platform=linux/arm64 golang:1.21.3-bullseye AS build-go
3-
# WORKDIR /opt/build
4-
# COPY spin.toml .
5-
# RUN curl -LO https://github.com/fermyon/spin-fileserver/releases/download/v0.2.1/spin_static_fs.wasm
6-
# RUN mkdir website
7-
# COPY website/public/ website/public/
8-
#
9-
# FROM scratch
10-
# COPY --from=build-go /opt/build/spin_static_fs.wasm .
11-
# COPY --from=build-go /opt/build/spin.toml .
12-
# COPY --from=build-go /opt/build/website .
13-
# ENTRYPOINT ["/spin.toml"]
1+
# FROM --platform=${BUILDPLATFORM}
2+
FROM --platform=linux/arm64 golang:1.21.3-bullseye AS build-go
3+
WORKDIR /opt/build
4+
COPY spin.toml .
5+
RUN curl -LO https://github.com/fermyon/spin-fileserver/releases/download/v0.2.1/spin_static_fs.wasm
6+
RUN mkdir website
7+
COPY website/public/ website/public/
8+
9+
FROM scratch
10+
COPY --from=build-go /opt/build/spin_static_fs.wasm .
11+
COPY --from=build-go /opt/build/spin.toml .
12+
COPY --from=build-go /opt/build/website .
13+
ENTRYPOINT ["/spin.toml"]

deploy/spin-app/kustomization.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
3-
namespace: default
3+
namespace: flux-docs
44
resources:
55
- spinapp.yaml
66
images:

deploy/spin-dev/ingress.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: networking.k8s.io/v1
2+
kind: Ingress
3+
metadata:
4+
name: flux-docs-webhook
5+
namespace: flux-system
6+
spec:
7+
ingressClassName: nginx
8+
rules:
9+
- host: talos-dev-webhook.howard.moomboo.space
10+
http:
11+
paths:
12+
- pathType: Prefix
13+
path: /
14+
backend:
15+
service:
16+
name: webhook-receiver
17+
port:
18+
number: 80

deploy/spin-dev/kustomization.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
namespace: flux-system
4+
resources:
5+
- ingress.yaml

deploy/spin-infra/kustomization.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
kind: Kustomization
2-
namespace: default
2+
namespace: flux-docs
33
resources:
4+
- namespace.yaml
45
- spin-operator.shim-executor.yaml

deploy/spin-infra/namespace.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apiVersion: v1
2+
kind: Namespace
3+
metadata:
4+
name: flux-docs

deploy/flux-oci/docs-app-ks.yaml kustomize-flux/docs-app-ks.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1
33
kind: Kustomization
44
metadata:
55
name: docs-app
6-
namespace: default
6+
namespace: flux-system
77
spec:
88
timeout: 1m0s
99
retryInterval: 1m30s

deploy/flux-oci/docs-infra-ks.yaml kustomize-flux/docs-infra-ks.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1
33
kind: Kustomization
44
metadata:
55
name: docs-infra
6-
namespace: default
6+
namespace: flux-system
77
spec:
88
timeout: 1m0s
99
retryInterval: 1m30s

kustomize-flux/docs-ingress-ks.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
apiVersion: kustomize.toolkit.fluxcd.io/v1
3+
kind: Kustomization
4+
metadata:
5+
name: docs-ingress
6+
namespace: flux-system
7+
spec:
8+
timeout: 1m0s
9+
retryInterval: 1m30s
10+
interval: 10m0s
11+
path: ./spin-dev
12+
prune: true
13+
wait: true
14+
sourceRef:
15+
kind: OCIRepository
16+
name: flux-docs
File renamed without changes.
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
3-
namespace: default
3+
namespace: flux-system
44
resources:
55
- flux-docs-oci.yaml
66
- flux-docs-receiver.yaml
77
- docs-app-ks.yaml
88
- docs-infra-ks.yaml
9+
- docs-ingress-ks.yaml

0 commit comments

Comments
 (0)