Update tools

This commit is contained in:
Luca Burgazzoli 2024-03-29 10:36:06 +01:00
parent 366882a40a
commit 55d09b0bfd
No known key found for this signature in database
GPG Key ID: 238C46A40510C1A9
13 changed files with 174 additions and 144 deletions

View File

@ -57,6 +57,7 @@ jobs:
kubernetes-version: kubernetes-version:
- "1.27.11" - "1.27.11"
- "1.28.7" - "1.28.7"
- "1.29.2"
steps: steps:
- name: "Checkout" - name: "Checkout"
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -66,7 +67,7 @@ jobs:
go-version-file: 'go.mod' go-version-file: 'go.mod'
check-latest: true check-latest: true
- name: 'SetUp KinD' - name: 'SetUp KinD'
uses: container-tools/kind-action@v2 uses: container-tools/kind-action@v2.0.4
with: with:
version: "v0.22.0" version: "v0.22.0"
kubectl_version: v${{ matrix.kubernetes-version }} kubectl_version: v${{ matrix.kubernetes-version }}

View File

@ -37,6 +37,7 @@ jobs:
kubernetes-version: kubernetes-version:
- "1.27.11" - "1.27.11"
- "1.28.7" - "1.28.7"
- "1.29.2"
steps: steps:
- name: "Checkout" - name: "Checkout"
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -46,7 +47,7 @@ jobs:
go-version-file: 'go.mod' go-version-file: 'go.mod'
check-latest: true check-latest: true
- name: 'SetUp KinD' - name: 'SetUp KinD'
uses: container-tools/kind-action@v2 uses: container-tools/kind-action@v2.0.4
with: with:
version: "v0.22.0" version: "v0.22.0"
kubectl_version: v${{ matrix.kubernetes-version }} kubectl_version: v${{ matrix.kubernetes-version }}
@ -58,14 +59,7 @@ jobs:
./hack/scripts/deploy_ingress.sh ./hack/scripts/deploy_ingress.sh
- name: "SetUp Dapr Kubernetes Operator" - name: "SetUp Dapr Kubernetes Operator"
run: | run: |
make deploy/e2e ./hack/scripts/deploy_e2e.sh
kubectl wait \
--namespace=dapr-system \
--for=condition=ready \
pod \
--selector=control-plane=dapr-control-plane \
--timeout=90s
- name: "Run Dapr Kubernetes Operator e2e" - name: "Run Dapr Kubernetes Operator e2e"
run: | run: |
make test/e2e/operator make test/e2e/operator

View File

@ -1,5 +1,5 @@
# Build the manager binary # Build the manager binary
FROM golang:1.21 as builder FROM golang:1.22 as builder
ARG TARGETOS ARG TARGETOS
ARG TARGETARCH ARG TARGETARCH

View File

@ -14,7 +14,7 @@ CATALOG_VERSION ?= latest
CATALOG_CONTAINER_IMAGE ?= $(CONTAINER_REGISTRY)/$(CONTAINER_REGISTRY_ORG)/$(PROJECT_NAME)-catalog:$(CATALOG_VERSION) CATALOG_CONTAINER_IMAGE ?= $(CONTAINER_REGISTRY)/$(CONTAINER_REGISTRY_ORG)/$(PROJECT_NAME)-catalog:$(CATALOG_VERSION)
LINT_GOGC ?= 10 LINT_GOGC ?= 10
LINT_DEADLINE ?= 10m LINT_TIMEOUT ?= 10m
MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
PROJECT_PATH := $(patsubst %/,%,$(dir $(MKFILE_PATH))) PROJECT_PATH := $(patsubst %/,%,$(dir $(MKFILE_PATH)))
@ -26,13 +26,13 @@ HELM_CHART_VERSION ?= 1.13.1
HELM_CHART_URL ?= https://raw.githubusercontent.com/dapr/helm-charts/master/dapr-$(HELM_CHART_VERSION).tgz HELM_CHART_URL ?= https://raw.githubusercontent.com/dapr/helm-charts/master/dapr-$(HELM_CHART_VERSION).tgz
## Tool Versions ## Tool Versions
CODEGEN_VERSION ?= v0.28.3 CODEGEN_VERSION ?= v0.28.8
KUSTOMIZE_VERSION ?= v5.2.1 KUSTOMIZE_VERSION ?= v5.3.0
CONTROLLER_TOOLS_VERSION ?= v0.13.0 CONTROLLER_TOOLS_VERSION ?= v0.14.0
KIND_VERSION ?= v0.20.0 KIND_VERSION ?= v0.22.0
LINTER_VERSION ?= v1.55.1 LINTER_VERSION ?= v1.57.2
OPERATOR_SDK_VERSION ?= v1.32.0 OPERATOR_SDK_VERSION ?= v1.34.1
OPM_VERSION ?= v1.30.1 OPM_VERSION ?= v1.38.0
GOVULNCHECK_VERSION ?= latest GOVULNCHECK_VERSION ?= latest
## Tool Binaries ## Tool Binaries
@ -164,8 +164,8 @@ check/lint: golangci-lint
@$(LINTER) run \ @$(LINTER) run \
--config .golangci.yml \ --config .golangci.yml \
--out-format tab \ --out-format tab \
--skip-dirs etc \ --exclude-dirs etc \
--deadline $(LINT_DEADLINE) \ --timeout $(LINT_TIMEOUT) \
--verbose --verbose
.PHONY: check/lint/fix .PHONY: check/lint/fix
@ -173,8 +173,8 @@ check/lint/fix: golangci-lint
@$(LINTER) run \ @$(LINTER) run \
--config .golangci.yml \ --config .golangci.yml \
--out-format tab \ --out-format tab \
--skip-dirs etc \ --exclude-dirs etc \
--deadline $(LINT_DEADLINE) \ --timeout $(LINT_TIMEOUT) \
--fix --fix
.PHONY: check/vuln .PHONY: check/vuln

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.13.0 controller-gen.kubebuilder.io/version: v0.14.0
name: daprcontrolplanes.operator.dapr.io name: daprcontrolplanes.operator.dapr.io
spec: spec:
group: operator.dapr.io group: operator.dapr.io
@ -47,23 +47,28 @@ spec:
openAPIV3Schema: openAPIV3Schema:
properties: properties:
apiVersion: apiVersion:
description: 'APIVersion defines the versioned schema of this representation description: |-
of an object. Servers should convert recognized schemas to the latest APIVersion defines the versioned schema of this representation of an object.
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string type: string
kind: kind:
description: 'Kind is a string value representing the REST resource this description: |-
object represents. Servers may infer this from the endpoint the client Kind is a string value representing the REST resource this object represents.
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string type: string
metadata: metadata:
type: object type: object
spec: spec:
properties: properties:
values: values:
description: 'JSON represents any valid JSON value. These types are description: |-
supported: bool, int64, float64, string, []interface{}, map[string]interface{} JSON represents any valid JSON value.
and nil.' These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.
x-kubernetes-preserve-unknown-fields: true x-kubernetes-preserve-unknown-fields: true
type: object type: object
status: status:
@ -80,42 +85,42 @@ spec:
conditions: conditions:
items: items:
description: "Condition contains details for one aspect of the current description: "Condition contains details for one aspect of the current
state of this API Resource. --- This struct is intended for direct state of this API Resource.\n---\nThis struct is intended for
use as an array at the field path .status.conditions. For example, direct use as an array at the field path .status.conditions. For
\n type FooStatus struct{ // Represents the observations of a example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
foo's current state. // Known .status.conditions.type are: \"Available\", observations of a foo's current state.\n\t // Known .status.conditions.type
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
// +listType=map // +listMapKey=type Conditions []metav1.Condition +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" \ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
\ // other fields\n\t}"
properties: properties:
lastTransitionTime: lastTransitionTime:
description: lastTransitionTime is the last time the condition description: |-
transitioned from one status to another. This should be when lastTransitionTime is the last time the condition transitioned from one status to another.
the underlying condition changed. If that is not known, then This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
using the time when the API field changed is acceptable.
format: date-time format: date-time
type: string type: string
message: message:
description: message is a human readable message indicating description: |-
details about the transition. This may be an empty string. message is a human readable message indicating details about the transition.
This may be an empty string.
maxLength: 32768 maxLength: 32768
type: string type: string
observedGeneration: observedGeneration:
description: observedGeneration represents the .metadata.generation description: |-
that the condition was set based upon. For instance, if .metadata.generation observedGeneration represents the .metadata.generation that the condition was set based upon.
is currently 12, but the .status.conditions[x].observedGeneration For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
is 9, the condition is out of date with respect to the current with respect to the current state of the instance.
state of the instance.
format: int64 format: int64
minimum: 0 minimum: 0
type: integer type: integer
reason: reason:
description: reason contains a programmatic identifier indicating description: |-
the reason for the condition's last transition. Producers reason contains a programmatic identifier indicating the reason for the condition's last transition.
of specific condition types may define expected values and Producers of specific condition types may define expected values and meanings for this field,
meanings for this field, and whether the values are considered and whether the values are considered a guaranteed API.
a guaranteed API. The value should be a CamelCase string. The value should be a CamelCase string.
This field may not be empty. This field may not be empty.
maxLength: 1024 maxLength: 1024
minLength: 1 minLength: 1
@ -129,11 +134,12 @@ spec:
- Unknown - Unknown
type: string type: string
type: type:
description: type of condition in CamelCase or in foo.example.com/CamelCase. description: |-
--- Many .condition.type values are consistent across resources type of condition in CamelCase or in foo.example.com/CamelCase.
like Available, but because arbitrary conditions can be useful ---
(see .node.status.conditions), the ability to deconflict is Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) useful (see .node.status.conditions), the ability to deconflict is important.
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
maxLength: 316 maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string type: string

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.13.0 controller-gen.kubebuilder.io/version: v0.14.0
name: daprcruiscontrols.operator.dapr.io name: daprcruiscontrols.operator.dapr.io
spec: spec:
group: operator.dapr.io group: operator.dapr.io
@ -45,14 +45,19 @@ spec:
description: DaprCruiseControl is the Schema for the daprcruisecontrols API. description: DaprCruiseControl is the Schema for the daprcruisecontrols API.
properties: properties:
apiVersion: apiVersion:
description: 'APIVersion defines the versioned schema of this representation description: |-
of an object. Servers should convert recognized schemas to the latest APIVersion defines the versioned schema of this representation of an object.
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string type: string
kind: kind:
description: 'Kind is a string value representing the REST resource this description: |-
object represents. Servers may infer this from the endpoint the client Kind is a string value representing the REST resource this object represents.
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string type: string
metadata: metadata:
type: object type: object
@ -74,42 +79,42 @@ spec:
conditions: conditions:
items: items:
description: "Condition contains details for one aspect of the current description: "Condition contains details for one aspect of the current
state of this API Resource. --- This struct is intended for direct state of this API Resource.\n---\nThis struct is intended for
use as an array at the field path .status.conditions. For example, direct use as an array at the field path .status.conditions. For
\n type FooStatus struct{ // Represents the observations of a example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
foo's current state. // Known .status.conditions.type are: \"Available\", observations of a foo's current state.\n\t // Known .status.conditions.type
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
// +listType=map // +listMapKey=type Conditions []metav1.Condition +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" \ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
\ // other fields\n\t}"
properties: properties:
lastTransitionTime: lastTransitionTime:
description: lastTransitionTime is the last time the condition description: |-
transitioned from one status to another. This should be when lastTransitionTime is the last time the condition transitioned from one status to another.
the underlying condition changed. If that is not known, then This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
using the time when the API field changed is acceptable.
format: date-time format: date-time
type: string type: string
message: message:
description: message is a human readable message indicating description: |-
details about the transition. This may be an empty string. message is a human readable message indicating details about the transition.
This may be an empty string.
maxLength: 32768 maxLength: 32768
type: string type: string
observedGeneration: observedGeneration:
description: observedGeneration represents the .metadata.generation description: |-
that the condition was set based upon. For instance, if .metadata.generation observedGeneration represents the .metadata.generation that the condition was set based upon.
is currently 12, but the .status.conditions[x].observedGeneration For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
is 9, the condition is out of date with respect to the current with respect to the current state of the instance.
state of the instance.
format: int64 format: int64
minimum: 0 minimum: 0
type: integer type: integer
reason: reason:
description: reason contains a programmatic identifier indicating description: |-
the reason for the condition's last transition. Producers reason contains a programmatic identifier indicating the reason for the condition's last transition.
of specific condition types may define expected values and Producers of specific condition types may define expected values and meanings for this field,
meanings for this field, and whether the values are considered and whether the values are considered a guaranteed API.
a guaranteed API. The value should be a CamelCase string. The value should be a CamelCase string.
This field may not be empty. This field may not be empty.
maxLength: 1024 maxLength: 1024
minLength: 1 minLength: 1
@ -123,11 +128,12 @@ spec:
- Unknown - Unknown
type: string type: string
type: type:
description: type of condition in CamelCase or in foo.example.com/CamelCase. description: |-
--- Many .condition.type values are consistent across resources type of condition in CamelCase or in foo.example.com/CamelCase.
like Available, but because arbitrary conditions can be useful ---
(see .node.status.conditions), the ability to deconflict is Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) useful (see .node.status.conditions), the ability to deconflict is important.
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
maxLength: 316 maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string type: string

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.13.0 controller-gen.kubebuilder.io/version: v0.14.0
name: daprinstances.operator.dapr.io name: daprinstances.operator.dapr.io
spec: spec:
group: operator.dapr.io group: operator.dapr.io
@ -45,14 +45,19 @@ spec:
description: DaprInstance is the Schema for the daprinstances API. description: DaprInstance is the Schema for the daprinstances API.
properties: properties:
apiVersion: apiVersion:
description: 'APIVersion defines the versioned schema of this representation description: |-
of an object. Servers should convert recognized schemas to the latest APIVersion defines the versioned schema of this representation of an object.
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string type: string
kind: kind:
description: 'Kind is a string value representing the REST resource this description: |-
object represents. Servers may infer this from the endpoint the client Kind is a string value representing the REST resource this object represents.
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string type: string
metadata: metadata:
type: object type: object
@ -73,9 +78,9 @@ spec:
type: string type: string
type: object type: object
values: values:
description: 'JSON represents any valid JSON value. These types are description: |-
supported: bool, int64, float64, string, []interface{}, map[string]interface{} JSON represents any valid JSON value.
and nil.' These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.
x-kubernetes-preserve-unknown-fields: true x-kubernetes-preserve-unknown-fields: true
type: object type: object
status: status:
@ -93,42 +98,42 @@ spec:
conditions: conditions:
items: items:
description: "Condition contains details for one aspect of the current description: "Condition contains details for one aspect of the current
state of this API Resource. --- This struct is intended for direct state of this API Resource.\n---\nThis struct is intended for
use as an array at the field path .status.conditions. For example, direct use as an array at the field path .status.conditions. For
\n type FooStatus struct{ // Represents the observations of a example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
foo's current state. // Known .status.conditions.type are: \"Available\", observations of a foo's current state.\n\t // Known .status.conditions.type
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
// +listType=map // +listMapKey=type Conditions []metav1.Condition +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" \ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
\ // other fields\n\t}"
properties: properties:
lastTransitionTime: lastTransitionTime:
description: lastTransitionTime is the last time the condition description: |-
transitioned from one status to another. This should be when lastTransitionTime is the last time the condition transitioned from one status to another.
the underlying condition changed. If that is not known, then This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
using the time when the API field changed is acceptable.
format: date-time format: date-time
type: string type: string
message: message:
description: message is a human readable message indicating description: |-
details about the transition. This may be an empty string. message is a human readable message indicating details about the transition.
This may be an empty string.
maxLength: 32768 maxLength: 32768
type: string type: string
observedGeneration: observedGeneration:
description: observedGeneration represents the .metadata.generation description: |-
that the condition was set based upon. For instance, if .metadata.generation observedGeneration represents the .metadata.generation that the condition was set based upon.
is currently 12, but the .status.conditions[x].observedGeneration For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
is 9, the condition is out of date with respect to the current with respect to the current state of the instance.
state of the instance.
format: int64 format: int64
minimum: 0 minimum: 0
type: integer type: integer
reason: reason:
description: reason contains a programmatic identifier indicating description: |-
the reason for the condition's last transition. Producers reason contains a programmatic identifier indicating the reason for the condition's last transition.
of specific condition types may define expected values and Producers of specific condition types may define expected values and meanings for this field,
meanings for this field, and whether the values are considered and whether the values are considered a guaranteed API.
a guaranteed API. The value should be a CamelCase string. The value should be a CamelCase string.
This field may not be empty. This field may not be empty.
maxLength: 1024 maxLength: 1024
minLength: 1 minLength: 1
@ -142,11 +147,12 @@ spec:
- Unknown - Unknown
type: string type: string
type: type:
description: type of condition in CamelCase or in foo.example.com/CamelCase. description: |-
--- Many .condition.type values are consistent across resources type of condition in CamelCase or in foo.example.com/CamelCase.
like Available, but because arbitrary conditions can be useful ---
(see .node.status.conditions), the ability to deconflict is Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) useful (see .node.status.conditions), the ability to deconflict is important.
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
maxLength: 316 maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string type: string

View File

@ -8,5 +8,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
images: images:
- name: controller - name: controller
newName: ttl.sh/ed03fbe9-61d9-4ccf-a481-9d443244168f-local-0 newName: ghcr.io/dapr-sandbox/dapr-kubernetes-operator
newTag: 1h newTag: 0.0.4

2
go.mod
View File

@ -1,6 +1,6 @@
module github.com/dapr-sandbox/dapr-kubernetes-operator module github.com/dapr-sandbox/dapr-kubernetes-operator
go 1.21 go 1.22
require ( require (
github.com/go-logr/logr v1.4.1 github.com/go-logr/logr v1.4.1

12
hack/scripts/deploy_e2e.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
set -e
make deploy/e2e
kubectl wait \
--namespace=dapr-system \
--for=condition=ready \
pod \
--selector=control-plane=dapr-control-plane \
--timeout=90s

View File

@ -2,8 +2,12 @@
set -e set -e
kubectl apply --server-side -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml # it may take a while to have apply the
# resource, hence the kubectl wait may
# fail
sleep 5
kubectl wait \ kubectl wait \
--namespace=ingress-nginx \ --namespace=ingress-nginx \

View File

@ -1,6 +1,7 @@
package maputils package maputils
import ( import (
"errors"
"fmt" "fmt"
"maps" "maps"
) )
@ -25,7 +26,7 @@ func Merge(dst map[string]interface{}, source map[string]interface{}) map[string
func Lookup(m map[string]interface{}, ks ...string) (interface{}, error) { func Lookup(m map[string]interface{}, ks ...string) (interface{}, error) {
if len(ks) == 0 { // degenerate input if len(ks) == 0 { // degenerate input
return nil, fmt.Errorf("lookup needs at least one key") return nil, errors.New("lookup needs at least one key")
} }
if rval, ok := m[ks[0]]; !ok { if rval, ok := m[ks[0]]; !ok {
return nil, fmt.Errorf("key not found; remaining keys: %v", ks) return nil, fmt.Errorf("key not found; remaining keys: %v", ks)

View File

@ -11,7 +11,7 @@ func formattedMessage(comparisonMessage string, failurePath []interface{}) strin
if len(failurePath) == 0 { if len(failurePath) == 0 {
diffMessage = "" diffMessage = ""
} else { } else {
diffMessage = fmt.Sprintf("\n\nfirst mismatched key: %s", formattedFailurePath(failurePath)) diffMessage = "\n\nfirst mismatched key: " + formattedFailurePath(failurePath)
} }
return fmt.Sprintf("%s%s", comparisonMessage, diffMessage) return fmt.Sprintf("%s%s", comparisonMessage, diffMessage)
} }