Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
34 changes: 34 additions & 0 deletions .asf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# note: documentation can be found here https://cwiki.apache.org/confluence/display/INFRA/Git+-+.asf.yaml+features

github:
description: 'Apache Druid Operator: a Kubernetes operator for Apache Druid.'
homepage: https://druid.apache.org/

# Attempt to make the auto-generated github emails more easily readable in email clients.
# Configuration adapted from https://github.com/apache/plc4x/blob/develop/.asf.yaml.
custom_subjects:
new_pr: "[PR] {title} ({repository})"
close_pr: "Re: [PR] {title} ({repository})"
comment_pr: "Re: [PR] {title} ({repository})"
diffcomment: "Re: [PR] {title} ({repository})"
merge_pr: "Re: [PR] {title} ({repository})"
new_issue: "[I] {title} ({repository})"
comment_issue: "Re: [I] {title} ({repository})"
close_issue: "Re: [I] {title} ({repository})"
catchall: "[GH] {title} ({repository})"
new_discussion: "[D] {title} ({repository})"
edit_discussion: "Re: [D] {title} ({repository})"
close_discussion: "Re: [D] {title} ({repository})"
close_discussion_with_comment: "Re: [D] {title} ({repository})"
reopen_discussion: "Re: [D] {title} ({repository})"
new_comment_discussion: "Re: [D] {title} ({repository})"
edit_comment_discussion: "Re: [D] {title} ({repository})"
delete_comment_discussion: "Re: [D] {title} ({repository})"

notifications:
commits: commits@druid.apache.org
issues: commits@druid.apache.org
discussions: commits@druid.apache.org
pullrequests_status: commits@druid.apache.org
pullrequests_comment: commits@druid.apache.org
pullrequests_bot_dependabot: commits@druid.apache.org
17 changes: 17 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
# Ignore build and test binaries.
bin/
Expand Down
40 changes: 39 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ NAMESPACE_MINIO_OPERATOR ?= "minio-operator"
MINIO_VERSION ?= "6.0.4"
# NAMESPACE for druid app e2e
NAMESPACE_DRUID ?= "druid"
# Set to false to skip the Apache RAT license audit
ENABLE_RAT ?= true

# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.26.0
Expand Down Expand Up @@ -103,6 +105,22 @@ test: manifests generate fmt vet envtest ## Run tests.
e2e: ## Runs e2e tests
e2e/e2e.sh

ifeq ($(ENABLE_RAT),true)
.PHONY: rat
rat: rat-jar ## Run Apache RAT license audit (set ENABLE_RAT=false to skip).
java -jar $(RAT_JAR) \
--input-exclude-std GIT \
--input-exclude "**/*.png" \
--input-exclude "**/*.sum" \
--input-exclude "**/zz_generated.*.go" \
--input-exclude "**/PROJECT" \
-- .
else
.PHONY: rat
rat: ## Run Apache RAT license audit (set ENABLE_RAT=false to skip).
@echo "Skipping Apache RAT license audit (ENABLE_RAT=false)"
endif

.PHONY: docker-build-local-test
docker-build-local-test: ## Build docker image with the manager for test on kind.
docker build -t ${IMG_KIND}:${TEST_IMG_TAG} -f e2e/Dockerfile-testpod .
Expand All @@ -111,6 +129,10 @@ docker-build-local-test: ## Build docker image with the manager for test on kind
docker-push-local-test: ## Push docker image with the manager to kind registry.
docker push ${IMG_KIND}:${TEST_IMG_TAG}

.PHONY: kind-load-local-test
kind-load-local-test: ## Load test docker image into kind cluster directly (no registry mirror needed).
kind load docker-image ${IMG_KIND}:${TEST_IMG_TAG}

.PHONY: deploy-testjob
deploy-testjob: ## Run a wikipedia test pod
kubectl create job wiki-test --image=${IMG_KIND}:${TEST_IMG_TAG} -- sh /wikipedia-test.sh
Expand Down Expand Up @@ -176,6 +198,10 @@ docker-build-local: ## Build docker image with the manager for kind registry.
docker-push-local: ## Push docker image with the manager to kind registry.
docker push ${IMG_KIND}:${IMG_TAG}

.PHONY: kind-load-local
kind-load-local: ## Load docker image into kind cluster directly (no registry mirror needed).
kind load docker-image ${IMG_KIND}:${IMG_TAG}

# PLATFORMS defines the target platforms for the manager image be build to provide support to multiple
# architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1). To use this option you need to:
# - able to use docker buildx . More info: https://docs.docker.com/build/buildx/
Expand Down Expand Up @@ -247,11 +273,13 @@ KUSTOMIZE ?= $(LOCALBIN)/kustomize
CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
GEN_CRD_API_REFERENCE_DOCS = $(LOCALBIN)/gen-crd-api-reference-docs
ENVTEST ?= $(LOCALBIN)/setup-envtest
RAT_JAR ?= $(LOCALBIN)/apache-rat.jar

## Tool Versions
KUSTOMIZE_VERSION ?= v3.8.7
CONTROLLER_TOOLS_VERSION ?= v0.14.0
CONTROLLER_TOOLS_VERSION ?= v0.20.1
GEN_CRD_API_REF_VERSION ?= v0.3.0
RAT_VERSION ?= 0.17

KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
.PHONY: kustomize
Expand All @@ -278,3 +306,13 @@ $(ENVTEST): $(LOCALBIN)
gen-crd-api-reference-docs: $(GEN_CRD_API_REFERENCE_DOCS)
$(GEN_CRD_API_REFERENCE_DOCS): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install github.com/ahmetb/gen-crd-api-reference-docs@$(GEN_CRD_API_REF_VERSION)

.PHONY: rat-jar
rat-jar: $(RAT_JAR) ## Download Apache RAT jar locally if necessary.
$(RAT_JAR): $(LOCALBIN)
mkdir -p /tmp/rat-download && \
curl -sSL "https://dlcdn.apache.org/creadur/apache-rat-$(RAT_VERSION)/apache-rat-$(RAT_VERSION)-bin.tar.gz" \
-o /tmp/rat-download/rat.tar.gz && \
tar -xzf /tmp/rat-download/rat.tar.gz -C /tmp/rat-download && \
mv /tmp/rat-download/apache-rat-$(RAT_VERSION)/apache-rat-$(RAT_VERSION).jar $(RAT_JAR) && \
rm -rf /tmp/rat-download
17 changes: 17 additions & 0 deletions chart/.helmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
Expand Down
Empty file modified e2e/druid-ingestion-test.sh
100644 → 100755
Empty file.
9 changes: 6 additions & 3 deletions e2e/e2e.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
set -o errexit
set -x
# Get Kind
go install sigs.k8s.io/kind@v0.21.0
go install sigs.k8s.io/kind@v0.31.0
export PATH="$(go env GOPATH)/bin:$PATH"
# minio statefulset name
MINIO_STS_NAME=myminio-minio
# druid namespace
Expand All @@ -33,12 +34,14 @@ make vet
make kind
# build local docker druid operator image
make docker-build-local
# push to kind registry
# push to kind registry and load directly into kind cluster
make docker-push-local
make kind-load-local
# build local docker test image
make docker-build-local-test
# push to kind registry
# push to kind registry and load directly into kind cluster
make docker-push-local-test
make kind-load-local-test
# try to install the CRD with make
make install
# install druid-operator
Expand Down
5 changes: 0 additions & 5 deletions e2e/kind.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,9 @@ then
kubectl config use-context kind-kind
else

# create a cluster with the local registry enabled in containerd
cat <<EOF | kind create cluster --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
containerdConfigPatches:
- |-
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:${reg_port}"]
endpoint = ["http://${reg_name}:5000"]
EOF
fi

Expand Down
Empty file modified e2e/monitor-task.sh
100644 → 100755
Empty file.
Empty file modified e2e/test-extra-common-config.sh
100644 → 100755
Empty file.
Empty file modified e2e/wikipedia-test.sh
100644 → 100755
Empty file.
17 changes: 17 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

module github.com/datainfrahq/druid-operator

go 1.20
Expand Down