diff options
| author | Robert Günzler <r@gnzler.io> | 2026-02-10 12:32:48 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2026-02-10 12:41:25 +0100 |
| commit | 63feeb9f369fc6176e85c1c2d8fcc863caad1946 (patch) | |
| tree | 41cd5d2d1ec36e74e464caab722cc9b460153f04 /.config/yamlfs | |
| parent | 5bd0a4aca65ecb9818ef1285982d160b6b6ff665 (diff) | |
start new
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to '.config/yamlfs')
| -rw-r--r-- | .config/yamlfs/.gitattributes | 1 | ||||
| -rw-r--r-- | .config/yamlfs/balena.yml | 20 | ||||
| -rw-r--r-- | .config/yamlfs/generic.yml | 75 | ||||
| -rw-r--r-- | .config/yamlfs/go-full.yaml | 193 | ||||
| -rw-r--r-- | .config/yamlfs/go.yaml | 169 | ||||
| -rw-r--r-- | .config/yamlfs/helm.yml | 397 | ||||
| -rw-r--r-- | .config/yamlfs/hugo.yml | 194 | ||||
| -rw-r--r-- | .config/yamlfs/meson.yml | 198 |
8 files changed, 0 insertions, 1247 deletions
diff --git a/.config/yamlfs/.gitattributes b/.config/yamlfs/.gitattributes deleted file mode 100644 index c2e46b3..0000000 --- a/.config/yamlfs/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.yml -whitespace diff --git a/.config/yamlfs/balena.yml b/.config/yamlfs/balena.yml deleted file mode 100644 index 73c39a8..0000000 --- a/.config/yamlfs/balena.yml +++ /dev/null @@ -1,20 +0,0 @@ -docker-compose.yml: |- - version: '2.1' - - services: - build: . - - volumes: - ctr-data: - -Dockerfile.template: |- - # vim: ft=dockerfile - FROM balenalib/%%BALENA_MACHINE_NAME%%-alpine:run - - COPY ./start.sh /usr/local/bin/ - CMD [ "start.sh" ] - -start.sh: |- - #!/bin/sh - set -e - while true; do echo "nothing" && sleep 20s; done diff --git a/.config/yamlfs/generic.yml b/.config/yamlfs/generic.yml deleted file mode 100644 index e097652..0000000 --- a/.config/yamlfs/generic.yml +++ /dev/null @@ -1,75 +0,0 @@ -{% $inbox := default "~robertgzr/public-inbox@lists.sr.ht" .inbox %} -README.md: |- - # {% .name %} - - ## Usage - - ``` - # how do I use it? - ``` - - {% if $inbox -%} - ## Bugs, help, patches? - - Send them to {% printf "[%s](mailto:%s?Subject=[%s]%%20)" $inbox $inbox .name %} - {%- end -%} - -{% if .license %} -LICENSE: |- - {% if eq .license "mit" %} - {% .name %} - Copyright (c) {% .license_year %} {% .license_author %} - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - {% end -%} - {% if eq .license "gpl" -%} - {% .name %} - Copyright © {% .license_year %} {% .license_author %} - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <https://www.gnu.org/licenses/>. - {% end -%} - {% if eq .license "agpl" -%} - {% .name %} - Copyright © {% .license_year %} {% .license_author %} - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - {% end -%} -{% end %} diff --git a/.config/yamlfs/go-full.yaml b/.config/yamlfs/go-full.yaml deleted file mode 100644 index 5728877..0000000 --- a/.config/yamlfs/go-full.yaml +++ /dev/null @@ -1,193 +0,0 @@ -{% $goversion := 1.15 %} -cmd: - {% .name %}: - main.go: | - package main - - func main() { - println("hello world") - } - -version: - version.go: | - package version - - var ( - Package = "{% .gopkg %}" - Revision = "" - Version = "0.0.0+unknown" - ) - -go.mod: | - module {% .gopkg %} - - go {% $goversion %} - -Dockerfile: | - # syntax=docker/dockerfile:1.2 - # vim: ft=dockerfile - - ARG GO_VERSION={% $goversion %} - - FROM --platform=${BUILDPLATFORM:?err} docker.io/tonistiigi/xx:golang AS xx - FROM --platform=${BUILDPLATFORM:?err} docker.io/library/golang:${GO_VERSION:?err}-alpine AS buildenv - COPY --from=xx / / - ARG TARGETPLATFORM - WORKDIR /src - RUN apk --update-cache --no-cache add make - - FROM buildenv AS gotestsum - RUN go get gotest.tools/gotestsum@0.6.0 - - FROM buildenv AS golangcilint - RUN go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.27.0 - - FROM buildenv AS test - COPY --from=gotestsum /go/bin/gotestsum /usr/local/bin/ - COPY --from=golangcilint /go/bin/golangci-lint /usr/local/bin/ - RUN --mount=target=/src,rw \ - --mount=type=cache,target=/go/pkg \ - --mount=type=cache,target=/root/.cache \ - make DESTDIR=/out clean validate test - - FROM buildenv AS build - RUN --mount=target=/src,rw \ - --mount=type=cache,target=/go/pkg \ - --mount=type=cache,target=/root/.cache \ - make DESTDIR=/out clean build - - FROM scratch AS final - COPY --from=build /out/{% .name %} / - - FROM --platform=${TARGETPLATFORM:?err} docker.io/library/alpine:3.11 AS runtime-base - RUN apk --update-cache --no-cache add ca-certificates - - FROM runtime-base AS run - COPY --from=build /out/{% .name %} /usr/local/bin/ - ENTRYPOINT [ "{% .name %}" ] - -Makefile: | - .POSIX: - - all: validate test {% .name %} - - DESTDIR ?= . - PREFIX ?= - VERSION ?= $(shell git describe --match 'v[0-9]*' --dirty='+dev' --always --tags) - REVISION ?= $(shell git rev-parse HEAD) - - GO ?= go - GO_PKG ?= {% .gopkg %} - GO_BUILDTAGS ?= netgo osusergo static_build - GO_LDFLAGS ?= -s -w -extldflags "-static" - GO_VERSIONFLAGS = -X $(GO_PKG)/version.Version=$(VERSION) -X $(GO_PKG)/version.Revision=$(REVISION) - - .PHONY: build - build: {% .name %} - {% .name %}: - $(GO) build \ - -tags '$(GO_BUILDTAGS)' -ldflags '$(GO_LDFLAGS) $(GO_VERSIONFLAGS)' \ - -o $(DESTDIR)$(PREFIX)/{% .name %} \ - ./cmd/{% .name %} - - PLATFORM ?= linux/amd64 - REPO ?= {% .name %} - TAG ?= $(VERSION) - - .PHONY: container-build - container-build: - DOCKER_BUILDKIT=1 \ - docker build --platform $(PLATFORM) --target final -o . . - - .PHONY: container-test - container-test: - DOCKER_BUILDKIT=1 \ - docker build --platform $(PLATFORM) --target test -o type=tar,dest=/dev/null . - - .PHONY: container-image - container-image: - DOCKER_BUILDKIT=1 \ - docker build --platform $(PLATFORM) --target run -t $(REPO):$(TAG) . - - .PHONY: cross - cross: - docker run --rm -it --privileged \ - --mount type=bind,src=$(PWD),dst=/src \ - --entrypoint buildctl-daemonless.sh \ - moby/buildkit:latest \ - buildctl build --frontend=dockerfile.v0 \ - --local context=/src --local dockerfile=/src \ - --opt filename=Dockerfile \ - --opt platform=$(PLATFORM) \ - --opt target=run \ - --output type=image,name=$(REPO):$(TAG),push=true - - GOLANGCI_LINT ?= golangci-lint - - .PHONY: validate - validate: - $(GOLANGCI_LINT) run --build-tags "$(GO_BUILDTAGS)" - - GOTEST_FLAGS ?= - ifneq ($(shell which gotestsum),) - GOTEST ?= gotestsum --format=testname -- - else - GOTEST ?= go test - endif - - .PHONY: test - test: - $(GOTEST) \ - -tags '$(GO_BUILDTAGS)' \ - -cover \ - -covermode=atomic \ - $(GOTEST_FLAGS) - - RM ?= rm -f - - .PHONY: clean - clean: - $(RM) {% .name %} - - .PHONY: help - help: - @printf "usage:\n" - @printf "\n" - @printf " build local build\n" - @printf " validate linter\n" - @printf " test tests\n" - @printf " container-build build w/ docker\n" - @printf " container-image image build\n" - @printf " cross build w/ buildkit (multi-platform support)\n" - @printf "\n" - @printf " DESTDIR, PREFIX output location (default: $(DESTDIR)/$(PREFIX))\n" - @printf " PLATFORM output platform (default: $(PLATFORM))\n" - @printf " REPO, TAG image repository:tag (default: $(REPO):$(TAG))\n" - @printf "\n" - -.editorconfig: | - ; http://editorconfig.org/ - - root = true - - [*] - insert_final_newline = true - charset = utf-8 - trim_trailing_whitespace = true - indent_style = space - indent_size = 2 - - [{Makefile,go.mod,go.sum,*go}] - indent_style = tab - indent_size = 8 - - [*.md] - trim_trailing_whitespace = false - - [Dockerfile] - indent_size = 4 - -README.md: | - # {% .name %} - - TODO diff --git a/.config/yamlfs/go.yaml b/.config/yamlfs/go.yaml deleted file mode 100644 index 96f6599..0000000 --- a/.config/yamlfs/go.yaml +++ /dev/null @@ -1,169 +0,0 @@ -{% $man := .man %} -cmd: - {% .name %}: - main.go: | - package main - - func main() { - println("hello world") - } - -version: - version.go: | - package version - - var ( - Package = "{% .pkg %}" - Revision = "-" - Version = "0.0.0+unknown" - ) - -go.mod: | -{% exec "sh" "-c" (printf "cd /tmp/;go mod init %s;cat go.mod;rm go.mod;" .pkg) | indent 4 %} - -Makefile: | - .POSIX: - - DESTDIR ?= . - BINDIR ?= $(PREFIX)/bin - MANDIR ?= $(PREFIX)/share/man - VERSION ?= $(shell git describe --match 'v[0-9]*' --dirty='+dev' --always --tags || printf "0.0.0+unknown") - REVISION ?= $(shell git rev-parse HEAD || printf "-") - - GO ?= go - GOLINT ?= $(GO) vet # golangci-lint run --build-tags "$(GO_BUILDTAGS)" - GOTEST ?= $(GO) test # gotestsum --format=testname -- - {% if $man -%} - SCDOC ?= scdoc - {%- end %} - - GO_BUILDTAGS ?= netgo osusergo static_build - GO_LDFLAGS ?= -s -w -extldflags -static - GOTEST_FLAGS ?= - GOLINT_FLAGS ?= - - all: lint test build {% if $man %}man{% end %} - - .PHONY: build - build: {% .name %} - - {% .name %}: GO_PKG = {% .pkg %} - {% .name %}: GO_VERSIONFLAGS += -X $(GO_PKG)/version.Version=$(VERSION) - {% .name %}: GO_VERSIONFLAGS += -X $(GO_PKG)/version.Revision=$(REVISION) - {% .name %}: GO_VERSIONFLAGS += -X $(GO_PKG)/version.Package=$(GO_PKG) - {% .name %}: $(shell find . -name '*.go') - $(GO) build -o $(DESTDIR)$(PREFIX)/$@ -tags '$(GO_BUILDTAGS)' -ldflags '$(GO_LDFLAGS) $(GO_VERSIONFLAGS)' ./cmd/$@ - - .PHONY: lint - lint: - $(GOLINT) $(GOLINT_FLAGS) ./... - .PHONY: validate - validate: lint - - .PHONY: test - test: - $(GOTEST) $(GOTEST_FLAGS) -tags '$(GO_BUILDTAGS)' -cover -covermode=atomic ./... - .PHONY: check - check: test - - {% if $man %} - manpages = doc/{% .name %}.1 - $(manpages): %: %.scd - $(manpages): - $(SCDOC) <$^ >$@ - .PHONY: - man: $(manpages) - - {% end %} - .PHONY: clean - clean: RM ?= rm -f - clean: - $(RM) {% .name %} - - .PHONY: install - install: - mkdir -p $(DESTDIR)$(BINDIR) - {% if $man -%} - mkdir -p $(DESTDIR)$(MANDIR)/man1 - {%- end %} - cp -f {% .name %} $(DESTDIR)$(BINDIR) - {% if $man -%} - cp -f doc/{% .name %}.1 $(DESTDIR)$(MANDIR)/man1 - {%- end %} - - .PHONY: uninstall - uninstall: - rm -v $(DESTDIR)$(BINDIR)/{% .name %} - {% if $man -%} - rm -v $(DESTDIR)$(MANDIR)/man1/{% .name %}.1 - {%- end %} - - .PHONY: help - help: - @printf "Usage:\n" - @printf " build build\n" - @printf " validate linter\n" - @printf " test tests\n" - @printf " (un)install install into system directories\n" - @printf "\n" - @printf " DESTDIR, PREFIX install location\n" - @printf "\n" - -.editorconfig: | - ; http://editorconfig.org/ - - root = true - - [*] - insert_final_newline = true - charset = utf-8 - trim_trailing_whitespace = true - indent_style = space - indent_size = 2 - - [{Makefile,go.mod,go.sum,*go}] - indent_style = tab - indent_size = 4 - - [*.md] - trim_trailing_whitespace = false - - [Dockerfile] - indent_size = 4 - -README.md: | - # {% .name %} - - TODO - -{% if $man %} -doc: - {% .name %}.1.scd: | - {% .name %}(1) - - # NAME - - {% .name %} - TODO - - # SYNOPSIS - - *{% .name %}* [options...] - - # DESCRIPTION - - TODO - - # OPTIONS - - *-h, -help* - Show help message and quit. - - # SEE ALSO - - *{% .name %}*(5) - - # AUTHORS - - Maintained by TODO author <mail>. - For more information, see {% .pkg %}. -{% end %} diff --git a/.config/yamlfs/helm.yml b/.config/yamlfs/helm.yml deleted file mode 100644 index 26a3ac9..0000000 --- a/.config/yamlfs/helm.yml +++ /dev/null @@ -1,397 +0,0 @@ -README.md: |- - # {% .name %} - - ## Configuration - - | Parameter | Default | Description - |-----------|---------|------------ - | replicas | 1 | - | image.repository | | - | image.tag | latest | - | image.pullPolicy | Always | - | service.port | 8080 | - | service.type | ClusterIP | - | service.loadBalancerIP | "" | - | service.annotations | [] | -{%- if .configmap %} - | configmap.config | "" | -{%- end %} - | nodeSelector | {} | - | affinity | {} | - | podAnnotations | {} | - | prometheus.enabled | false | -{%- if .ingress %} - | ingress.enabled | false | - | ingress.annotations | {} | - | ingress.hosts | false | - | ingress.path | / | - | ingress.tls | {} | -{%- end %} -{%- if .pvc %} - | persistence.enabled | false | - | persistence.accessModes | [ReadOnlyOnce] | - | persistence.size | 500Mi | - | persistence.storageClass | "-" | - | persistence.existingClaim | "" | - | persistence.subPath | "" | - | persistence.hostPath | "" | this skips setting up any PVs/PVCs -{%- end %} - | resources.requests.memory | | - | resources.requests.cpu | | - | resources.limits.memory | | - | resources.limits.cpu | | - -.editorconfig: |- - ; http://editorconfig.org/ - - root = true - - [*] - charset = utf-8 - end_of_line = lf - indent_style = space - - [*.yaml] - indent_size = 2 - - [*.md] - trim_trailing_whitespace = false - -Chart.yaml: |- - apiVersion: v1 - name: {% .name %} - version: {% default "0.1.0" .version %} - description: {% default "TODO" .desc %} - home: TODO - icon: TODO - sources: - - TODO - maintainers: - - name: TODO - email: TODO - engine: gotpl - -values.yaml: |- - replicas: 1 - - image: - repository: docker.io/TODO/TODO - tag: latest - pullPolicy: Always - - additionalArgs: [] - - service: - annotations: - # port: 8080 - -{% if .configmap %} - # configmap: - # config: |- - # # TODO -{%- end %} - - nodeSelector: {} - affinity: {} - - podAnnotations: {} - - prometheus: - enabled: false - -{% if .ingress %} - ingress: - enabled: false - # annotations: - # - TODO - # path: / - # hosts: - # - TODO - # tls: -{%- end %} - -{% if .pvc %} - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - enabled: true - - accessModes: - - ReadWriteOnce - - ## Persistent Volume Size - size: 5Gi - - ## Persistent Volume Storage Class - ## If defined, storageClassName: <storageClass> - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - - ## PersistentVolume existing claim name - ## If defined, PVC must be created manually before volume will be bound - ## - existingClaim: "" - - ## Subdirectory of Persistent Volume to mount - ## Useful if the volume's root directory is not empty - ## - subPath: "" - - ## Host directory to mount in to the pod - ## Only use with nodeSelector! - # hostPath: "" -{%- end %} - - ## Configure resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - # resources: - # requests: - # memory: 512Mi - # cpu: 300m - # limits: - # memory: 2Gi - # cpu: 1.0 - -templates: - _helpers.tpl: |- - {{/* vim: set filetype=mustache: */}} - - {{/* - Expand the name of the chart. - */}} - {{- define "{% .name %}.name" -}} - {{- printf "%s" .Chart.Name | trunc 63 | trimSuffix "-" -}} - {{- end -}} - - {{/* - Create a default fully qulified app name. - We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). - */}} - {{- define "{% .name %}.fullname" -}} - {{- $name := default .Chart.Name .Values.nameOverride -}} - {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} - {{- end -}} - - {{/* - Create chart name and version as used by the chart label. - */}} - {{- define "{% .name %}.chart" -}} - {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} - {{- end -}} - - deployment.yaml: |- - apiVersion: apps/v1 - kind: Deployment - metadata: - name: {{ template "{% .name %}.name" . }} - labels: - app.kubernetes.io/name: {{ template "{% .name %}.name" . }} - app: {{ template "{% .name %}.name" . }} - chart: {{ template "{% .name %}.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - spec: - replicas: {{ default 1 .Values.replicas }} - selector: - matchLabels: - app: {{ template "{% .name %}.name" . }} - release: "{{ .Release.Name }}" - template: - metadata: - labels: - app.kubernetes.io/name: {{ template "{% .name %}.name" . }} - app: {{ template "{% .name %}.name" . }} - annotations: - {{- if .Values.prometheus.enabled }} - prometheus.io/scrape: "true" - {{- end }} - {{- if .Values.podAnnotations }} - {{- .Values.podAnnotations | toYaml | indent 8 }} - {{- end }} - spec: - {{- if .Values.nodeSelector }} - nodeSelector: - {{- .Values.nodeSelector | toYaml | trimSuffix "\n" | nindent 8 }} - {{- end }} - {{- if .Values.affinity }} - affinity: - {{- .Values.affinity | toYaml | trimSuffix "\n" | nindent 8 }} - {{- end }} - containers: - - name: {{ template "{% .name %}.fullname" . }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }} - args: - {{- range .Values.additionalArgs }} - - {{ . | quote }} - {{- end }} - ports: - - name: http - containerPort: TODO - # livenessProbe: - # readinessProbe: - env: [] - volumeMounts: -{%- if .pvc %} - - name: {% .name %}-data - mountPath: /data -{%- end %} - {{- if .Values.configmap }} - - name: {% .name %}-config - mountPath: /config - {{- end }} - volumes: -{%- if .pvc %} - - name: {% .name %}-data - {{- if .Values.persistence.enabled }} - {{- if .Values.persistence.hostPath }} - hostPath: - path: {{ .Values.persistence.hostPath | quote }} - type: Directory - {{- else }} - persistentVolumeClaim: - claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "{% .name %}.name" . }}{{- end }} - {{- end }} - {{- else }} - emptyDir: {} - {{- end }} -{%- end %} -{%- if .configmap %} - {{- if .Values.configmap }} - - name: {% .name %}-config - configMap: - name: {{ template "{% .name %}.name" . }}-config - {{- end }} -{%- end %} - resources: - {{- toYaml .Values.resources | indent 10 }} - - svc.yaml: |- - apiVersion: v1 - kind: Service - metadata: - name: {{ template "{% .name %}.name" . }} - labels: - app.kubernetes.io/name: {{ template "{% .name %}.name" . }} - app: {{ template "{% .name %}.name" . }} - chart: {{ template "{% .name %}.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - {{- if .Values.service.annotations }} - annotations: - {{- .Values.service.annotations | toYaml | trimSuffix "\n" | nindent 4 }} - {{- end }} - spec: - {{ $serviceType := default "ClusterIP" .Values.service.type }} - type: {{ $serviceType }} - {{- if eq $serviceType "LoadBalancer" }} - loadBalancerIP: {{ default "" .Values.service.loadBalancerIP }} - {{- end }} - ports: - - name: http - port: {{ default "80" .Values.service.Port }} - targetPort: http - selector: - app: {{ template "{% .name %}.name" . }} - release: "{{ .Release.Name }}" - -{%- if .ingress %} - ingress.yaml: |- - {{- if .Values.ingress.enabled -}} - {{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} - apiVersion: networking.k8s.io/v1beta1 - {{- else -}} - apiVersion: extensions/v1beta1 - {{- end }} - kind: Ingress - metadata: - name: {{ template "{% .name %}.name" . }} - labels: - app.kubernetes.io/name: {{ template "{% .name %}.name" . }} - app: {{ template "{% .name %}.name" . }} - chart: {{ template "{% .name %}.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - {{- if .Values.ingress.annotations }} - annotations: - {{- .Values.ingress.annotations | toYaml | trimSuffix "\n" | nindent 4 }} - {{- end }} - spec: - {{- with .Values.ingress.tls }} - tls: - {{- toYaml . | indent 4 }} - {{- end }} - rules: - {{ $ingressPath := default "/" .Values.ingress.path }} - {{ $fullname := template "{% .name %}.name" . }} - {{- range .Values.ingress.hosts }} - - host: {{ . | quote }} - http: - paths: - - path: {{ $ingressPath }} - backend: - serviceName: {{ $fullname }} - servicePort: http - {{- end }} - {{- end -}} -{%- end %} - -{%- if .pvc %} - pvc.yaml: |- - {{- if .Values.persistence.enabled -}} - {{- if not .Values.persistence.hostPath -}} - {{- if not .Values.persistence.existingClaim -}} - kind: PersistentVolumeClaim - apiVersion: v1 - metadata: - name: {{ template "{% .name %}.name" . }} - labels: - app.kubernetes.io/name: {{ template "{% .name %}.name" . }} - app: {{ template "{% .name %}.name" . }} - chart: {{ template "{% .name %}.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - spec: - accessModes: - {{- range .Values.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - {{- if .Values.persistence.storageClass }} - {{- if (eq "-" .Values.persistence.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ .Values.persistence.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ .Values.persistence.size }} - {{- end -}} - {{- end -}} - {{- end -}} -{%- end %} - -{%- if .configmap %} - configmap.yaml: |- - {{- if .Values.configmap }} - apiVersion: v1 - kind: ConfigMap - metadata: - name: {{ template "{% .name %}.name" . }} - labels: - app.kubernetes.io/name: {{ template "{% .name %}.name" . }} - app: {{ template "{% .name %}.name" . }} - chart: {{ template "{% .name %}.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - data: - {{- .Values.configmap | indent 2 }} - {{- end -}} -{%- end %} - diff --git a/.config/yamlfs/hugo.yml b/.config/yamlfs/hugo.yml deleted file mode 100644 index 8c08066..0000000 --- a/.config/yamlfs/hugo.yml +++ /dev/null @@ -1,194 +0,0 @@ -{% exec git init %} -{% exec hugo new site -f toml %} - -Makefile: |- - repo ?= {% default "TODO" .repo %} - rev ?= $(shell git describe --tags --always --abbrev=7) - - all: clean public/index.html - - public/index.html: - DOCKER_BUILDKIT=1 docker build --platform=linux/amd64 \ - --output=./public \ - --target=final . - - clean: - rm -rf ./public/* - - .PHONY: - all clean - dev - container container-clean push - - dev: - docker image inspect hugo:server >/dev/null || \ - docker build --target=server --tag=hugo:server . - docker run --rm -it \ - --mount type=bind,src=$(PWD),dst=/src,ro \ - --mount type=tmpfs,dst=/src/public \ - --publish 1313:1313 \ - hugo:server - - container: - img build --platform=linux/amd64 --tag=$(repo):$(rev) \ - --target=deploy \ - --no-console . - img tag $(repo):$(rev) $(repo):latest - - container-clean: - img rm $(repo):latest || true - img rm $(repo):$(rev) || true - - push: - img push $(repo):$(rev) - img push $(repo):latest - -Caddyfile: |- - :2015 - root * /public - @index { - path_regexp .*/$ - } - uri_replace @index {path} {path}index.html - try_files {uri} 404.html /404.html - respond /healthz 200 - respond /readyz 200 - encode zstd gzip - file_server - -Dockerfile: |- - FROM docker.io/library/alpine AS hugo - RUN apk add git hugo - - FROM hugo AS dev - WORKDIR /src - ENTRYPOINT [ "hugo" ] - - FROM dev AS build - COPY . . - ARG HUGO_BUILD_ARGS="--cleanDestinationDir" - RUN hugo ${HUGO_BUILD_ARGS} - - FROM scratch AS final - COPY --from=build /src/public /public - - FROM dev AS server - CMD ["server", "--bind=0.0.0.0"] - - FROM scratch AS final - COPY --from=build /src/public/* / - - FROM docker.io/robertgzr/caddy:v2.0.0-beta13 AS caddy - FROM scratch AS deploy - COPY --from=caddy /usr/bin/caddy /caddy - COPY --from=build /src/public /public - COPY ./Caddyfile /Caddyfile - WORKDIR /public - EXPOSE 2015 - ENTRYPOINT ["/caddy", "run", "--config=/Caddyfile"] - -assets: - scss: - main.scss: |- - @import "reset"; - - @import "modules/all"; - - @import "partials/content"; - @import "partials/header"; - @import "partials/footer"; - @import "partials/typo"; - - _reset.scss: |- - html { - font-size: $fs-normal; - } - - * { - box-sizing: border-box; - text-rendering: geometricPrecision; - } - - body { - font-size: $fs-normal; - line-height: 1.5rem; - margin: 0; - font-family: serif; - word-wrap: break-word; - } - - h1, h2, h3, h4, h5, h6 { - line-height: 1.3em; - } - - fieldset { - border: none; - padding: 0; - margin: 0; - } - - pre { - padding: 2rem; - margin: 1.75rem 0; - background-color: white; - border: 1px solid #ccc; - overflow: auto; - } - - pre code, - code[class*="language-"], pre[class*="language-"] { - font-weight: 100; - text-shadow: none; - margin: 1.75rem 0; - } - - a { - cursor: pointer; - text-decoration: none; - } - - modules: - _all.scss: |- - // mixins go here - - @mixin invert() { - filter: hue-rotate(180deg) contrast(100%) invert(100%); - -webkit-filter: hue-rotate(180deg) contrast(100%) invert(100%); - } - @mixin invert_img() { - filter: invert(100%) hue-rotate(180deg) brightness(105%) contrast(85%); - -webkit-filter: invert(100%) hue-rotate(180deg) brightness(105%) contrast(85%); - } - - partials: - _content.scss: |- - // TODO content style - _header.scss: |- - // TODO header style - _footer.scss: |- - // TODO footer style - _typo.scss: |- - // TODO typography style - -layouts/humans.txt: |- - User-agent: * - {{ if (getenv "HUGO_ENV") "production" }} - Disallow: - {{ else }} - Disallow: / - {{ end }} - -static/humans.txt: |- - /* WHAT IS THIS? */ - https://humanstxt.org - - /* AUTHOR */ - Standard: TODO - Email: TODO - - /* SITE */ - Last update:{% printf "%s" time.Now().Format("2006/01/02") %} - Language: English - Doctype:HTML5 - IDE: vim, alacritty - Technologies: hugo, scss, yamlfs, docker diff --git a/.config/yamlfs/meson.yml b/.config/yamlfs/meson.yml deleted file mode 100644 index 4204c86..0000000 --- a/.config/yamlfs/meson.yml +++ /dev/null @@ -1,198 +0,0 @@ -README.md: |- - # {% .name %} - - TODO - -meson.build: |- - project( - '{% .name %}', - 'c', - version: '0.0.0+unknown', - license: 'MIT', - meson_version: '>=0.50.0', - default_options: [ - 'c_std=c99', - 'warning_level=2', - 'werror=true', - ], - ) - - cc = meson.get_compiler('c') - add_project_arguments(cc.get_supported_arguments([ - '-D_POSIX_C_SOURCE 200112L', - - '-Wundef', - '-Wlogical-op', - '-Wmissing-include-dirs', - '-Wold-style-definition', - '-Wpointer-arith', - '-Winit-self', - '-Wfloat-equal', - '-Wstrict-prototypes', - '-Wredundant-decls', - '-Wimplicit-fallthrough=2', - '-Wendif-labels', - '-Wstrict-aliasing=2', - '-Woverflow', - '-Wformat=2', - - '-Wno-missing-braces', - '-Wno-missing-field-initializers', - '-Wno-unused-parameter', - ]), language: 'c') - - version = '"@0@ (" __DATE__ ")"'.format(meson.project_version()) - # embed version sourced from git ref - git = find_program('git', native: true, required: false) - if git.found() - git_commit_hash = run_command([ - git, 'describe', '--always', '--tags' - ]) - git_branch = run_command([ - git, 'rev-parse', '--abbrev-ref', 'HEAD' - ]) - if git_commit_hash.returncode() == 0 and git_branch.returncode() == 0 - version = '"@0@ (" __DATE__ ", branch \'@1@\')"'.format( - git_commit_hash.stdout().strip(), - git_branch.stdout().strip(), - ) - endif - endif - add_project_arguments('-DVERSION=@0@'.format(version), language: 'c') - - {%- if .man %} - - scdoc = dependency( - 'scdoc', - version: '>=1.9.2', - native: true, - required: get_option('man-pages'), - ) - if scdoc.found() - scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true) - sh = find_program('sh', native: true) - mandir = get_option('mandir') - man_files = [ - '{% .name %}.1.scd', - ] - foreach fn : man_files - topic = fn.split('.')[-3].split('/')[-1] - section = fn.split('.')[-2] - output = '@0@.@1@'.format(topic, section) - - custom_target( - output, - input: fn, - output: output, - command: [ - sh, '-c', '@0@ < @INPUT@ > @1@'.format(scdoc_prog.path(), output) - ], - install: true, - install_dir: '@0@/man@1@'.format(mandir, section), - ) - endforeach - endif - {%- end %} - - src_inc = include_directories('include') - src_files = [ - 'src/main.c', - ] - - executable( - meson.project_name(), - files(src_files), - dependencies: [], - include_directories: [src_inc], - install: true, - ) - -{% if (eq .man "true") %} -meson_options.txt: | - option('man-pages', type: 'feature', value: 'auto', description: 'Generate man pages using scdoc') - -{% .name %}.1.scd: | - {% .name %}(1) - - # NAME - - {% .name %} - TODO - - # SYNOPSIS - - *{% .name %}* [options...] - - # DESCRIPTION - - TODO - - # OPTIONS - - *-h, -help* - Show help message and quit. - - # SEE ALSO - - *{% .name %}*(5) - - # AUTHORS - - Maintained by TODO author <mail>. - For more information, see <website>. -{% end %} - -src: - main.c: |- - #define _POSIX_C_SOURCE 200112L - - #include <stdlib.h> - #include <stdio.h> - - #include "{% .name %}.h" - - int main(int argc, char **argv) { - printf("%s version %s\n\n", *argv, VERSION); - - printf("args (len: %d)", argc-1); - for (int i=1; i < argc; ++i) { - printf(" '%s'", argv[i]); - } - printf("\n"); - - return 0; - } - -include: - {% .name | lower %}.h: |- - #ifndef {% .name | upper %}_H - #define {% .name | upper %}_H - - #ifndef VERSION - #define VERSION "0.0.0+unknown" - #endif - - /* TODO */ - - #endif - -.gitignore: |- - build/ - -.editorconfig: |- - ; http://editorconfig.org/ - root = true - - [*] - charset = utf-8 - end_of_line = lf - indent_style = tab - insert_final_newline = true - trim_trailing_whitespace = true - - [*.md] - trim_trailing_whitespace = false - -{% if (eq .docker "true") %} -Dockerfile: |- - TODO -{% end %} |