Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixes
  • Loading branch information
sklarsa committed Aug 7, 2023
commit 6ddf49ca3546151a110c839fdc4bbaa32e36da48
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,15 @@ kind-provision: kind kind-create docker-build download-test-crds
echo "Waiting for cert-manager to be ready..."
sleep 45

KIND_IMG ?= $(IMG)
ifeq ($(DOCKER),podman)
KIND_IMG=localhost/$(IMG)
endif

.PHONY: kind-deploy
kind-deploy: kind kind-provision deploy
kubectl set image deployment/questdb-operator-controller-manager -n questdb-operator-system \
manager=$(KIND_IMG)

.PHONY: kind-clean
kind-clean: kind
Expand Down
5 changes: 5 additions & 0 deletions api/v1beta1/questdb_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (

v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/utils/pointer"
ctrl "sigs.k8s.io/controller-runtime"
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/webhook"
Expand All @@ -50,6 +51,10 @@ func (r *QuestDB) Default() {
if r.Spec.ImagePullPolicy == v1.PullPolicy("") {
r.Spec.ImagePullPolicy = v1.PullIfNotPresent
}

if r.Spec.PodSecurityContext.FSGroup == nil {
r.Spec.PodSecurityContext.FSGroup = pointer.Int64(10001)
}
}

// TODO(user): change verbs to "verbs=create;update;delete" if you want to enable deletion validation.
Expand Down
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ kind: Kustomization
images:
- name: controller
newName: questdb/questdb-operator
newTag: v0.4.2
newTag: v0.0.0
1 change: 1 addition & 0 deletions config/samples/crd_v1beta1_questdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ metadata:
app.kubernetes.io/created-by: questdb-operator
name: questdb-sample
spec:
imagePullPolicy: Always
volume:
size: 10Gi
image: questdb/questdb:latest