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
14 changes: 13 additions & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,22 @@ on:

jobs:

rat:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '11'
- name: Run Apache RAT license audit
run: make rat

tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run Kubebuilder smoke and unit tests
run: make test
- name: Run helm lint
Expand Down
29 changes: 29 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,37 @@ help: ## Display this help.
kind: ## Bootstrap Kind Locally
sh e2e/kind.sh

define APACHE_YAML_HEADER
#
# 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.
#
endef
export APACHE_YAML_HEADER

.PHONY: manifests
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
$(CONTROLLER_GEN) crd:generateEmbeddedObjectMeta=true rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
$(CONTROLLER_GEN) crd:generateEmbeddedObjectMeta=true paths="./..." output:crd:artifacts:config=chart/crds/
@for f in config/crd/bases/druid.apache.org_*.yaml chart/crds/druid.apache.org_*.yaml config/rbac/role.yaml; do \
tmp=$$(mktemp) && \
{ printf '%s\n' "$$APACHE_YAML_HEADER"; cat $$f; } > $$tmp && \
mv $$tmp $$f; \
done

.PHONY: generate
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
Expand Down Expand Up @@ -112,8 +139,10 @@ rat: rat-jar ## Run Apache RAT license audit (set ENABLE_RAT=false to skip).
--input-exclude-std GIT \
--input-exclude "**/*.png" \
--input-exclude "**/*.sum" \
--input-exclude "**/*.sh" \
--input-exclude "**/zz_generated.*.go" \
--input-exclude "**/PROJECT" \
--input-exclude "**/.asf.yaml" \
-- .
else
.PHONY: rat
Expand Down
3 changes: 2 additions & 1 deletion apis/druid/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion chart/crds/druid.apache.org_druidingestions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.20.1
name: druidingestions.druid.apache.org
spec:
group: druid.apache.org
Expand Down
200 changes: 20 additions & 180 deletions chart/crds/druid.apache.org_druids.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion config/crd/bases/druid.apache.org_druidingestions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.20.1
name: druidingestions.druid.apache.org
spec:
group: druid.apache.org
Expand Down
200 changes: 20 additions & 180 deletions config/crd/bases/druid.apache.org_druids.yaml

Large diffs are not rendered by default.

48 changes: 2 additions & 46 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,40 +26,9 @@ rules:
- ""
resources:
- configmaps
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- events
verbs:
- create
- get
- list
- patch
- watch
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- pods
- services
verbs:
- create
- delete
Expand All @@ -71,30 +40,17 @@ rules:
- apiGroups:
- ""
resources:
- services
- events
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps
resources:
- deployments
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps
resources:
- statefulsets
verbs:
- create
Expand Down
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
// 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
//
// 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
Expand Down