openfuyao-system-controller
Used for quickly deploying and uninstalling openFuyao management plane on K8s clusters.
Image Building
Build Parameters
GOPRIVATE: Configure Go language private repository, equivalent to theGOPRIVATEenvironment variable.COMMIT: Hash value of the current git commit.VERSION: Component version.SOURCE_DATE_EPOCH: Timestamp of the image rootfs.
Build Commands
-
Build and push to specified OCI repository.
Using
dockerdocker buildx build . -f <path/to/dockerfile> \ -o type=image,name=<oci/repository>:<tag>,oci-mediatypes=true,rewrite-timestamp=true,push=true \ --platform=linux/amd64,linux/arm64 \ --provenance=false \ --build-arg=GOPRIVATE=gopkg.openfuyao.cn \ --build-arg=COMMIT=$(git rev-parse HEAD) \ --build-arg=VERSION=0.0.0-latest \ --build-arg=SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)Using
nerdctlnerdctl build . -f <path/to/dockerfile> \ -o type=image,name=<oci/repository>:<tag>,oci-mediatypes=true,rewrite-timestamp=true,push=true \ --platform=linux/amd64,linux/arm64 \ --provenance=false \ --build-arg=GOPRIVATE=gopkg.openfuyao.cn \ --build-arg=COMMIT=$(git rev-parse HEAD) \ --build-arg=VERSION=0.0.0-latest \ --build-arg=SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)Where
<path/to/dockerfile>is the Dockerfile path,<oci/repository>is the image address, and<tag>is the image tag. -
Build and export OCI Layout to local tarball.
Using
dockerdocker buildx build . -f <path/to/dockerfile> \ -o type=oci,name=<oci/repository>:<tag>,dest=<path/to/oci-layout.tar>,rewrite-timestamp=true \ --platform=linux/amd64,linux/arm64 \ --provenance=false \ --build-arg=GOPRIVATE=gopkg.openfuyao.cn \ --build-arg=COMMIT=$(git rev-parse HEAD) \ --build-arg=VERSION=0.0.0-latest \ --build-arg=SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)Using
nerdctlnerdctl build . -f <path/to/dockerfile> \ -o type=oci,name=<oci/repository>:<tag>,dest=<path/to/oci-layout.tar>,rewrite-timestamp=true \ --platform=linux/amd64,linux/arm64 \ --provenance=false \ --build-arg=GOPRIVATE=gopkg.openfuyao.cn \ --build-arg=COMMIT=$(git rev-parse HEAD) \ --build-arg=VERSION=0.0.0-latest \ --build-arg=SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)Where
<path/to/dockerfile>is the Dockerfile path,<oci/repository>is the image address,<tag>is the image tag, andpath/to/oci-layout.taris the tar package path. -
Build and export image rootfs to local directory.
Using
dockerdocker buildx build . -f <path/to/dockerfile> \ -o type=local,dest=<path/to/output>,platform-split=true \ --platform=linux/amd64,linux/arm64 \ --provenance=false \ --build-arg=GOPRIVATE=gopkg.openfuyao.cn \ --build-arg=COMMIT=$(git rev-parse HEAD) \ --build-arg=VERSION=0.0.0-latestUsing
nerdctlnerdctl build . -f <path/to/dockerfile> \ -o type=local,dest=<path/to/output>,platform-split=true \ --platform=linux/amd64,linux/arm64 \ --provenance=false \ --build-arg=GOPRIVATE=gopkg.openfuyao.cn \ --build-arg=COMMIT=$(git rev-parse HEAD) \ --build-arg=VERSION=0.0.0-latestWhere
<path/to/dockerfile>is the Dockerfile path andpath/to/outputis the local directory path.
Deployment
Reference: https://docs.openfuyao.cn/en/