Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kobzonega committed Jan 16, 2024
1 parent c93b263 commit 835e7d0
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-pr.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: check-pr
on:
on:
pull_request_target:
branches:
- 'master'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ jobs:
kind load docker-image kind/ydb-operator:current
- name: pull-and-load-other-images
run: |
docker pull k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.0
kind load docker-image k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.0
docker pull k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.0@sha256:f3b6b39a6062328c095337b4cadcefd1612348fdd5190b1dcbcb9b9e90bd8068
kind load docker-image k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.0@sha256:f3b6b39a6062328c095337b4cadcefd1612348fdd5190b1dcbcb9b9e90bd8068
# TODO would be cool to parse YDB image from manifests to avoid duplicating information
docker pull cr.yandex/crptqonuodf51kdj7a7d/ydb:22.4.44
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/upload-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches:
- master
jobs:
tag-job:
tag-job:
runs-on: ubuntu-latest
outputs:
tagcreated: ${{steps.tag-step.outputs.tagcreated}}
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
env:
SA_KEYS_FOR_PRIVATE_DOCKER_HELM_AND_PUBLIC_DOCKER: ${{ secrets.SA_KEYS_FOR_PRIVATE_DOCKER_HELM_AND_PUBLIC_DOCKER }}
- name: parse-version-from-chart
run: |
run: |
VERSION=$(cat ./deploy/ydb-operator/Chart.yaml | sed -n 's/^version: //p')
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: login-to-registries
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ vet: ## Run go vet against code.
kind-init:
if kind get clusters | grep "kind-ydb-operator"; then exit 0; fi; \
kind create cluster --config e2e/kind-cluster-config.yaml --name kind-ydb-operator; \
docker pull k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.0@sha256:f3b6b39a6062328c095337b4cadcefd1612348fdd5190b1dcbcb9b9e90bd8068; \
kind load docker-image k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.0@sha256:f3b6b39a6062328c095337b4cadcefd1612348fdd5190b1dcbcb9b9e90bd8068 --name kind-ydb-operator; \
docker pull cr.yandex/crptqonuodf51kdj7a7d/ydb:22.4.44; \
kind load docker-image cr.yandex/crptqonuodf51kdj7a7d/ydb:22.4.44 --name kind-ydb-operator

Expand Down
3 changes: 2 additions & 1 deletion api/v1alpha1/databasenodeset_types.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package v1alpha1

import (
"github.com/ydb-platform/ydb-kubernetes-operator/internal/controllers/constants"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/ydb-platform/ydb-kubernetes-operator/internal/controllers/constants"
)

// DatabaseNodeSetSpec describes an group nodes of Database object
Expand Down
3 changes: 2 additions & 1 deletion api/v1alpha1/storagenodeset_types.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package v1alpha1

import (
"github.com/ydb-platform/ydb-kubernetes-operator/internal/controllers/constants"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/ydb-platform/ydb-kubernetes-operator/internal/controllers/constants"
)

// StorageNodeSetSpec describes an group nodes of Storage object
Expand Down
15 changes: 15 additions & 0 deletions deploy/ydb-operator/crds/databasenodeset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2236,12 +2236,27 @@ spec:
description: Number of nodes (pods) in the set
format: int32
type: integer
operatorSync:
default: true
description: Enables or disables operator's reconcile loop. `false`
means all the Pods are running, but the reconcile is effectively
turned off. `true` means the default state of the system, all Pods
running, operator reacts to specification change of this Database
resource.
type: boolean
path:
description: '(Optional) Custom database path in schemeshard Default:
/<spec.domain>/<metadata.name>'
maxLength: 255
pattern: /[a-zA-Z0-9]([-_a-zA-Z0-9]*[a-zA-Z0-9])?/[a-zA-Z0-9]([-_a-zA-Z0-9]*[a-zA-Z0-9])?(/[a-zA-Z0-9]([-_a-zA-Z0-9]*[a-zA-Z0-9])?)*
type: string
pause:
default: false
description: The state of the Database processes. `true` means all
the Database Pods are being killed, but the Database resource is
persisted. `false` means the default state of the system, all Pods
running.
type: boolean
priorityClassName:
description: (Optional) If specified, the pod's priorityClassName.
type: string
Expand Down
14 changes: 14 additions & 0 deletions deploy/ydb-operator/crds/storagenodeset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2379,6 +2379,20 @@ spec:
description: Number of nodes (pods) in the set
format: int32
type: integer
operatorSync:
default: true
description: Enables or disables operator's reconcile loop. `false`
means all the Pods are running, but the reconcile is effectively
turned off. `true` means the default state of the system, all Pods
running, operator reacts to specification change of this Database
resource.
type: boolean
pause:
default: false
description: The state of the Storage processes. `true` means all
the Stprage Pods are being killed, but the Storage resource is persisted.
`false` means the default state of the system, all Pods running.
type: boolean
priorityClassName:
description: (Optional) If specified, the pod's priorityClassName.
type: string
Expand Down
1 change: 0 additions & 1 deletion e2e/tests/smoke_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,6 @@ var _ = Describe("Operator smoke test", func() {

return len(storagePods.Items) == 0
}, Timeout, Interval).Should(BeTrue())

By("... and then storage pods must not restart for a while...")
Consistently(func(g Gomega) bool {
storagePods := corev1.PodList{}
Expand Down

0 comments on commit 835e7d0

Please sign in to comment.