You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ho...@apache.org on 2021/01/25 19:54:45 UTC

[lucene-solr-operator] branch main updated: Apachify the solr-operator helm chart. (#200)

This is an automated email from the ASF dual-hosted git repository.

houston pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene-solr-operator.git


The following commit(s) were added to refs/heads/main by this push:
     new 60bb5e1  Apachify the solr-operator helm chart. (#200)
60bb5e1 is described below

commit 60bb5e172031175819a7922d9281260b64406e25
Author: Houston Putman <ho...@apache.org>
AuthorDate: Mon Jan 25 14:54:36 2021 -0500

    Apachify the solr-operator helm chart. (#200)
---
 Makefile                                           |  8 +++----
 hack/{boilerplate.go.txt => headers/header.go.txt} |  0
 hack/headers/header.tpl.txt                        | 16 +++++++++++++
 hack/headers/header.yaml.txt                       | 14 ++++++++++++
 hack/helm/copy_crds_roles_helm.sh                  |  7 ++++--
 helm/solr-operator/Chart.yaml                      | 18 +++++++++++++--
 helm/solr-operator/NOTICE.txt                      | 26 ++++++++++++++++++++++
 helm/solr-operator/crds/crds.yaml                  | 15 +++++++++++++
 helm/solr-operator/templates/_helpers.tpl          | 17 ++++++++++++++
 helm/solr-operator/templates/deployment.yaml       | 15 +++++++++++++
 helm/solr-operator/templates/role.yaml             | 15 +++++++++++++
 helm/solr-operator/templates/role_binding.yaml     | 15 +++++++++++++
 helm/solr-operator/templates/service_account.yaml  | 15 +++++++++++++
 helm/solr-operator/values.yaml                     | 15 +++++++++++++
 14 files changed, 188 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index 6c8847d..9fb2f68 100644
--- a/Makefile
+++ b/Makefile
@@ -64,6 +64,10 @@ deploy: manifests install
 	cd config/manager && touch kustomization.yaml && kustomize edit add resource manager.yaml && kustomize edit set image bloomberg/solr-operator=${IMG}:${VERSION}
 	kubectl apply -k config/default
 
+# Generate code
+generate: controller-gen mod-tidy
+	$(CONTROLLER_GEN) object:headerFile=./hack/headers/header.go.txt paths="./..."
+
 # Generate manifests e.g. CRD, RBAC etc.
 manifests: controller-gen mod-tidy
 	$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=solr-operator-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
@@ -90,10 +94,6 @@ manifests-check:
 helm-check:
 	helm lint helm/solr-operator
 
-# Generate code
-generate: controller-gen mod-tidy
-	$(CONTROLLER_GEN) object:headerFile=./hack/boilerplate.go.txt paths="./..."
-
 
 # # find or download controller-gen
 # download controller-gen if necessary
diff --git a/hack/boilerplate.go.txt b/hack/headers/header.go.txt
similarity index 100%
rename from hack/boilerplate.go.txt
rename to hack/headers/header.go.txt
diff --git a/hack/headers/header.tpl.txt b/hack/headers/header.tpl.txt
new file mode 100644
index 0000000..6172678
--- /dev/null
+++ b/hack/headers/header.tpl.txt
@@ -0,0 +1,16 @@
+{{/*
+   * 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.
+   */}}
\ No newline at end of file
diff --git a/hack/headers/header.yaml.txt b/hack/headers/header.yaml.txt
new file mode 100644
index 0000000..13878a1
--- /dev/null
+++ b/hack/headers/header.yaml.txt
@@ -0,0 +1,14 @@
+# 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.
\ No newline at end of file
diff --git a/hack/helm/copy_crds_roles_helm.sh b/hack/helm/copy_crds_roles_helm.sh
index fa757b8..6f05e46 100755
--- a/hack/helm/copy_crds_roles_helm.sh
+++ b/hack/helm/copy_crds_roles_helm.sh
@@ -9,11 +9,14 @@ set -u
 echo "Copying CRDs and Role to helm repo"
 
 # Build and package CRDs
-kustomize build config/crd > helm/solr-operator/crds/crds.yaml
+cat hack/headers/header.yaml.txt > helm/solr-operator/crds/crds.yaml
+printf "\n\n" >> helm/solr-operator/crds/crds.yaml
+kustomize build config/crd >> helm/solr-operator/crds/crds.yaml
 
 # Copy Kube Role for Solr Operator permissions to Helm
 rm helm/solr-operator/templates/role.yaml
-printf '{{- if .Values.rbac.create }}\n{{- range $namespace := (split "," (include "solr-operator.watchNamespaces" $)) }}\n' > helm/solr-operator/templates/role.yaml
+cat hack/headers/header.yaml.txt > helm/solr-operator/templates/role.yaml
+printf '\n\n{{- if .Values.rbac.create }}\n{{- range $namespace := (split "," (include "solr-operator.watchNamespaces" $)) }}\n' >> helm/solr-operator/templates/role.yaml
 cat config/rbac/role.yaml >> helm/solr-operator/templates/role.yaml
 printf '\n{{- end }}\n{{- end }}' >> helm/solr-operator/templates/role.yaml
 gawk -i inplace '/^rules:$/{print "  namespace: {{ $namespace }}"}1' helm/solr-operator/templates/role.yaml
diff --git a/helm/solr-operator/Chart.yaml b/helm/solr-operator/Chart.yaml
index 87b56f9..9f70697 100644
--- a/helm/solr-operator/Chart.yaml
+++ b/helm/solr-operator/Chart.yaml
@@ -1,3 +1,17 @@
+# 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.
 
 apiVersion: v1
 name: solr-operator
@@ -15,8 +29,8 @@ keywords:
   - lucene
   - operator
 maintainers:
+  - name: Solr Dev Community
+    email: dev@lucene.apache.org
   - name: Houston Putman
     email: houston@apache.org
-  - name: Balaji Sankaranarayanan
-    email: bsankaranara@bloomberg.net
 icon: https://lucene.apache.org/theme/images/solr/identity/Solr_Logo_on_white.png
diff --git a/helm/solr-operator/NOTICE.txt b/helm/solr-operator/NOTICE.txt
new file mode 100644
index 0000000..580d63e
--- /dev/null
+++ b/helm/solr-operator/NOTICE.txt
@@ -0,0 +1,26 @@
+==============================================================
+ Apache Solr Operator
+ Copyright 2006-2021 The Apache Software Foundation
+==============================================================
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+This includes code provided by Bloomberg Finance LP as a Software Grant
+to The ASF.
+=========================================================================
+==  Solr Operator Bloomberg Notice                                     ==
+=========================================================================
+Copyright 2019 Bloomberg Finance LP.
+
+Licensed 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.
diff --git a/helm/solr-operator/crds/crds.yaml b/helm/solr-operator/crds/crds.yaml
index 3d579e2..1c0b2fd 100644
--- a/helm/solr-operator/crds/crds.yaml
+++ b/helm/solr-operator/crds/crds.yaml
@@ -1,3 +1,18 @@
+# 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.
+
 apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
diff --git a/helm/solr-operator/templates/_helpers.tpl b/helm/solr-operator/templates/_helpers.tpl
index d394cbe..2445fe6 100644
--- a/helm/solr-operator/templates/_helpers.tpl
+++ b/helm/solr-operator/templates/_helpers.tpl
@@ -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.
+   */}}
+
 {{/* vim: set filetype=mustache: */}}
 {{/*
 Expand the name of the chart.
diff --git a/helm/solr-operator/templates/deployment.yaml b/helm/solr-operator/templates/deployment.yaml
index f2b821f..d3c54cf 100644
--- a/helm/solr-operator/templates/deployment.yaml
+++ b/helm/solr-operator/templates/deployment.yaml
@@ -1,3 +1,18 @@
+# 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.
+
 apiVersion: apps/v1
 kind: Deployment
 metadata:
diff --git a/helm/solr-operator/templates/role.yaml b/helm/solr-operator/templates/role.yaml
index 75cce8b..f01ddbd 100644
--- a/helm/solr-operator/templates/role.yaml
+++ b/helm/solr-operator/templates/role.yaml
@@ -1,3 +1,18 @@
+# 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.
+
 {{- if .Values.rbac.create }}
 {{- range $namespace := (split "," (include "solr-operator.watchNamespaces" $)) }}
 
diff --git a/helm/solr-operator/templates/role_binding.yaml b/helm/solr-operator/templates/role_binding.yaml
index 05ec674..3d1bc26 100644
--- a/helm/solr-operator/templates/role_binding.yaml
+++ b/helm/solr-operator/templates/role_binding.yaml
@@ -1,3 +1,18 @@
+# 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.
+
 {{- if .Values.rbac.create }}
 {{- range $namespace := (split "," (include "solr-operator.watchNamespaces" $)) }}
 ---
diff --git a/helm/solr-operator/templates/service_account.yaml b/helm/solr-operator/templates/service_account.yaml
index f453055..38003ff 100644
--- a/helm/solr-operator/templates/service_account.yaml
+++ b/helm/solr-operator/templates/service_account.yaml
@@ -1,3 +1,18 @@
+# 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.
+
 {{- if .Values.serviceAccount.create }}
 apiVersion: v1
 kind: ServiceAccount
diff --git a/helm/solr-operator/values.yaml b/helm/solr-operator/values.yaml
index 193c18f..f8f7ccc 100644
--- a/helm/solr-operator/values.yaml
+++ b/helm/solr-operator/values.yaml
@@ -1,3 +1,18 @@
+# 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.
+
 # Default values for solr-operator.
 # This is a YAML-formatted file.
 # Declare variables to be passed into your templates.