Skip to content

Commit 25d4124

Browse files
committed
feat: implement resource metadata annotations
The implementation is exactly same for labels and annotations, but annotations don't support any kind of querying/filtering. Fixes #135 Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
1 parent a02800d commit 25d4124

15 files changed

Lines changed: 610 additions & 223 deletions

File tree

.kres.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ spec:
55
- --experimental_allow_proto3_optional
66
vtProtobufEnabled: true
77
specs:
8-
- source: https://raw.githubusercontent.com/cosi-project/specification/80fd72f766d949f0ecb9753e739fc625d83af5c8/proto/v1alpha1/resource.proto
8+
- source: https://raw.githubusercontent.com/cosi-project/specification/c0f4e7ba6f9a4c7b857b7d110bff3dc5d523cacf/proto/v1alpha1/resource.proto
99
subdirectory: v1alpha1/
1010
genGateway: true
1111
external: false
12-
- source: https://raw.githubusercontent.com/cosi-project/specification/80fd72f766d949f0ecb9753e739fc625d83af5c8/proto/v1alpha1/state.proto
12+
- source: https://raw.githubusercontent.com/cosi-project/specification/c0f4e7ba6f9a4c7b857b7d110bff3dc5d523cacf/proto/v1alpha1/state.proto
1313
subdirectory: v1alpha1/
1414
genGateway: true
1515
external: false
16-
- source: https://raw.githubusercontent.com/cosi-project/specification/80fd72f766d949f0ecb9753e739fc625d83af5c8/proto/v1alpha1/runtime.proto
16+
- source: https://raw.githubusercontent.com/cosi-project/specification/c0f4e7ba6f9a4c7b857b7d110bff3dc5d523cacf/proto/v1alpha1/runtime.proto
1717
subdirectory: v1alpha1/
1818
genGateway: true
1919
external: false
20-
- source: https://raw.githubusercontent.com/cosi-project/specification/80fd72f766d949f0ecb9753e739fc625d83af5c8/proto/v1alpha1/meta.proto
20+
- source: https://raw.githubusercontent.com/cosi-project/specification/c0f4e7ba6f9a4c7b857b7d110bff3dc5d523cacf/proto/v1alpha1/meta.proto
2121
subdirectory: v1alpha1/
2222
genGateway: true
2323
external: false

Dockerfile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,36 @@
22

33
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
44
#
5-
# Generated on 2022-08-26T08:13:01Z by kres latest.
5+
# Generated on 2022-09-19T12:00:34Z by kres 2e9342e.
66

77
ARG TOOLCHAIN
88

9-
FROM ghcr.io/siderolabs/ca-certificates:v1.1.0 AS image-ca-certificates
9+
FROM ghcr.io/siderolabs/ca-certificates:v1.2.0 AS image-ca-certificates
1010

11-
FROM ghcr.io/siderolabs/fhs:v1.1.0 AS image-fhs
11+
FROM ghcr.io/siderolabs/fhs:v1.2.0 AS image-fhs
1212

1313
# runs markdownlint
14-
FROM node:18.7.0-alpine AS lint-markdown
14+
FROM docker.io/node:18.9.0-alpine3.16 AS lint-markdown
1515
WORKDIR /src
16-
RUN npm i -g markdownlint-cli@0.31.1
16+
RUN npm i -g markdownlint-cli@0.32.2
1717
RUN npm i sentences-per-line@0.2.1
1818
COPY .markdownlint.json .
1919
COPY ./README.md ./README.md
2020
RUN markdownlint --ignore "CHANGELOG.md" --ignore "**/node_modules/**" --ignore '**/hack/chglog/**' --rules node_modules/sentences-per-line/index.js .
2121

2222
# collects proto specs
2323
FROM scratch AS proto-specs
24-
ADD https://raw.githubusercontent.com/cosi-project/specification/80fd72f766d949f0ecb9753e739fc625d83af5c8/proto/v1alpha1/resource.proto /api/v1alpha1/
25-
ADD https://raw.githubusercontent.com/cosi-project/specification/80fd72f766d949f0ecb9753e739fc625d83af5c8/proto/v1alpha1/state.proto /api/v1alpha1/
26-
ADD https://raw.githubusercontent.com/cosi-project/specification/80fd72f766d949f0ecb9753e739fc625d83af5c8/proto/v1alpha1/runtime.proto /api/v1alpha1/
27-
ADD https://raw.githubusercontent.com/cosi-project/specification/80fd72f766d949f0ecb9753e739fc625d83af5c8/proto/v1alpha1/meta.proto /api/v1alpha1/
24+
ADD https://raw.githubusercontent.com/cosi-project/specification/c0f4e7ba6f9a4c7b857b7d110bff3dc5d523cacf/proto/v1alpha1/resource.proto /api/v1alpha1/
25+
ADD https://raw.githubusercontent.com/cosi-project/specification/c0f4e7ba6f9a4c7b857b7d110bff3dc5d523cacf/proto/v1alpha1/state.proto /api/v1alpha1/
26+
ADD https://raw.githubusercontent.com/cosi-project/specification/c0f4e7ba6f9a4c7b857b7d110bff3dc5d523cacf/proto/v1alpha1/runtime.proto /api/v1alpha1/
27+
ADD https://raw.githubusercontent.com/cosi-project/specification/c0f4e7ba6f9a4c7b857b7d110bff3dc5d523cacf/proto/v1alpha1/meta.proto /api/v1alpha1/
2828

2929
# base toolchain image
3030
FROM ${TOOLCHAIN} AS toolchain
3131
RUN apk --update --no-cache add bash curl build-base protoc protobuf-dev
3232

3333
# build tools
34-
FROM toolchain AS tools
34+
FROM --platform=${BUILDPLATFORM} toolchain AS tools
3535
ENV GO111MODULE on
3636
ENV CGO_ENABLED 0
3737
ENV GOPATH /go

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
22
#
3-
# Generated on 2022-08-25T16:48:30Z by kres latest.
3+
# Generated on 2022-09-19T12:00:34Z by kres 2e9342e.
44

55
# common variables
66

@@ -17,7 +17,7 @@ GO_VERSION ?= 1.19
1717
GOIMPORTS_VERSION ?= v0.1.12
1818
PROTOBUF_GO_VERSION ?= 1.28.1
1919
GRPC_GO_VERSION ?= 1.2.0
20-
GRPC_GATEWAY_VERSION ?= 2.11.1
20+
GRPC_GATEWAY_VERSION ?= 2.11.3
2121
VTPROTOBUF_VERSION ?= 0.3.0
2222
DEEPCOPY_VERSION ?= v0.5.5
2323
TESTPKGS ?= ./...
@@ -39,6 +39,7 @@ COMMON_ARGS += --build-arg=ARTIFACTS=$(ARTIFACTS)
3939
COMMON_ARGS += --build-arg=SHA=$(SHA)
4040
COMMON_ARGS += --build-arg=TAG=$(TAG)
4141
COMMON_ARGS += --build-arg=USERNAME=$(USERNAME)
42+
COMMON_ARGS += --build-arg=REGISTRY=$(REGISTRY)
4243
COMMON_ARGS += --build-arg=TOOLCHAIN=$(TOOLCHAIN)
4344
COMMON_ARGS += --build-arg=GOLANGCILINT_VERSION=$(GOLANGCILINT_VERSION)
4445
COMMON_ARGS += --build-arg=GOFUMPT_VERSION=$(GOFUMPT_VERSION)

0 commit comments

Comments
 (0)