adutra commented on code in PR #234:
URL: https://github.com/apache/polaris-tools/pull/234#discussion_r3497816269


##########
console/helm/templates/httproute.yaml:
##########
@@ -24,27 +25,23 @@ apiVersion: gateway.networking.k8s.io/v1
 kind: HTTPRoute
 metadata:
   name: {{ $fullName }}
+  namespace: {{ .Release.Namespace }}
   labels:
     {{- include "polaris-console.labels" . | nindent 4 }}
   {{- with .Values.httproute.annotations }}
   annotations:
     {{- toYaml . | nindent 4 }}
   {{- end }}
 spec:
-  hostnames: {{ .Values.httproute.hosts }}
+  hostnames: {{ .Values.httproute.hosts | toJson }}
   parentRefs:
-    - name: {{ .Values.httproute.gatewayName}}
-      group: {{ .Values.httproute.gatewayGroup }}

Review Comment:
   nit: we could have left group & kind.



##########
console/helm/templates/ingress.yaml:
##########
@@ -1,49 +1,51 @@
-#
-# 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.
-#
+{{/*
+  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.
+*/}}
+
 {{- include "polaris-console.validateRouting" . }}
 {{- if .Values.ingress.enabled }}
 {{- $fullName := include "polaris-console.fullname" . }}
-
+{{- $svcPort := .Values.service.port }}
 apiVersion: networking.k8s.io/v1
 kind: Ingress
 metadata:
   name: {{ $fullName }}
+  namespace: {{ .Release.Namespace }}
   labels:
     {{- include "polaris-console.labels" . | nindent 4 }}
-  {{- with .Values.ingress.annotations }}
+  {{- if .Values.ingress.annotations }}
   annotations:
-    {{- toYaml . | nindent 4 }}
+    {{- tpl (toYaml .Values.ingress.annotations) . | nindent 4 }}
   {{- end }}
 spec:
   {{- if .Values.ingress.className }}
-  ingressClassName: {{ .Values.ingress.className }}
+  ingressClassName: {{ .Values.ingress.className | quote }}
   {{- end }}
-  {{- if .Values.ingress.tls }}

Review Comment:
   nit: you could have left this if block.



##########
Makefile:
##########
@@ -101,6 +101,32 @@ console-lint-fix: ## Fix linting issues in the console 
project
 console-version: ## Display version for console project
        @$(MAKE) -C console version
 
+##@ Console Helm
+
+.PHONY: console-helm
+console-helm: ## Run most Helm targets (schema, unittest, and lint)
+       @$(MAKE) -C console helm
+
+.PHONY: console-helm-install-plugins
+console-helm-install-plugins: ## Install required Helm plugins (unittest, 
schema)
+       @$(MAKE) -C console helm-install-plugins
+
+.PHONY: helm-lint

Review Comment:
   ```suggestion
   .PHONY: console-helm-lint
   ```



##########
Makefile:
##########
@@ -101,6 +101,32 @@ console-lint-fix: ## Fix linting issues in the console 
project
 console-version: ## Display version for console project
        @$(MAKE) -C console version
 
+##@ Console Helm
+
+.PHONY: console-helm
+console-helm: ## Run most Helm targets (schema, unittest, and lint)
+       @$(MAKE) -C console helm
+
+.PHONY: console-helm-install-plugins
+console-helm-install-plugins: ## Install required Helm plugins (unittest, 
schema)
+       @$(MAKE) -C console helm-install-plugins
+
+.PHONY: helm-lint
+console-helm-lint: ## Run Helm chart lint check
+       @$(MAKE) -C console helm-lint
+
+.PHONY: helm-schema-generate
+console-helm-schema-generate: ## Generate Helm chart JSON schema from 
values.yaml
+       @$(MAKE) -C console helm-schema-generate
+
+.PHONY: helm-schema-verify
+console-helm-schema-verify: ## Verify Helm chart JSON schema is up to date
+       @$(MAKE) -C console helm-schema-verify
+
+.PHONY: helm-unittest

Review Comment:
   ```suggestion
   .PHONY: console-helm-unittest
   ```



##########
console/Makefile:
##########
@@ -89,3 +89,143 @@ lint-fix: format-fix ## Fix linting issues in the console 
project
        @echo "--- Fixing linting issues in the console project ---"
        @npm run lint -- --fix
        @echo "--- Linting issues in the console project fixed ---"
+
+##@ Helm
+
+.PHONY: helm
+helm: helm-schema-generate helm-lint helm-unittest ## Run most Helm targets 
(schema, unittest, and lint)
+
+helm-install-plugins: DEPENDENCIES := helm
+.PHONY: helm-install-plugins
+helm-install-plugins: check-dependencies ## Install required Helm plugins 
(unittest, schema)
+       @echo "--- Installing Helm plugins ---"
+       @HELM_MAJOR_VERSION=$$(helm version --short | sed 's/^v//' | cut -d. 
-f1); \
+       if [ "$$HELM_MAJOR_VERSION" -ge 4 ] 2>/dev/null; then \
+               HELM_PLUGIN_FLAGS="--verify=false"; \

Review Comment:
   Why do we need `verify-false`?



##########
console/helm/templates/_helpers.tpl:
##########
@@ -43,14 +43,37 @@ Create a default fully qualified app name.
 {{- end }}
 
 {{/*
-Create chart name and version as used by the chart label.
+  Create a default fully qualified app name, with a custom suffix. Useful when 
the name will
+  have a suffix appended to it, such as for the management service name.
+*/}}
+{{- define "polaris-console.fullnameWithSuffix" -}}

Review Comment:
   I know this is coming for the Polaris Helm chart, but it seems unused. Do we 
need to include this template now?



##########
console/helm/templates/_helpers.tpl:
##########
@@ -1,33 +1,33 @@
 {{/*
-

Review Comment:
   This change doesn't look required to me, it's better not to touch the 
license headers unless there is an error in them.



##########
Makefile:
##########
@@ -101,6 +101,32 @@ console-lint-fix: ## Fix linting issues in the console 
project
 console-version: ## Display version for console project
        @$(MAKE) -C console version
 
+##@ Console Helm
+
+.PHONY: console-helm
+console-helm: ## Run most Helm targets (schema, unittest, and lint)
+       @$(MAKE) -C console helm
+
+.PHONY: console-helm-install-plugins
+console-helm-install-plugins: ## Install required Helm plugins (unittest, 
schema)
+       @$(MAKE) -C console helm-install-plugins
+
+.PHONY: helm-lint
+console-helm-lint: ## Run Helm chart lint check
+       @$(MAKE) -C console helm-lint
+
+.PHONY: helm-schema-generate
+console-helm-schema-generate: ## Generate Helm chart JSON schema from 
values.yaml
+       @$(MAKE) -C console helm-schema-generate
+
+.PHONY: helm-schema-verify

Review Comment:
   ```suggestion
   .PHONY: console-helm-schema-verify
   ```



##########
console/LICENSE:
##########
@@ -198,4 +198,15 @@
    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
+   limitations under the License.
+
+--------------------------------------------------------------------------------
+
+This product includes code from Project Nessie.
+
+* helm/polaris/templates/_helpers.tpl

Review Comment:
   The paths are wrong: should be `console/helm/templates/_helpers.tpl` and 
`console/helm/templates/serviceaccount.yaml`.



##########
Makefile:
##########
@@ -101,6 +101,32 @@ console-lint-fix: ## Fix linting issues in the console 
project
 console-version: ## Display version for console project
        @$(MAKE) -C console version
 
+##@ Console Helm
+
+.PHONY: console-helm
+console-helm: ## Run most Helm targets (schema, unittest, and lint)
+       @$(MAKE) -C console helm
+
+.PHONY: console-helm-install-plugins
+console-helm-install-plugins: ## Install required Helm plugins (unittest, 
schema)
+       @$(MAKE) -C console helm-install-plugins
+
+.PHONY: helm-lint
+console-helm-lint: ## Run Helm chart lint check
+       @$(MAKE) -C console helm-lint
+
+.PHONY: helm-schema-generate

Review Comment:
   ```suggestion
   .PHONY: console-helm-schema-generate
   ```



##########
console/helm/README.md:
##########
@@ -0,0 +1,47 @@
+<!--
+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.
+-->
+
+# Helm Chart for Apache Polaris Console
+
+The Apache Polaris Console is a web UI for [Apache 
Polaris](https://polaris.apache.org/),
+an open-source catalog console for Apache Polaris.

Review Comment:
   ```suggestion
   The Apache Polaris Console is a web UI for [Apache 
Polaris](https://polaris.apache.org/).
   ```



##########
console/helm/artifacthub-repo.yml:
##########
@@ -0,0 +1,24 @@
+#
+# 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.
+#
+
+# Artifact Hub repository metadata file
+repositoryID: apache-polaris-console # TODO: Update this with the actual 
repository ID later

Review Comment:
   Let's create the Artifact Hub repository for this chart. But before that, we 
need to publish at least one version of the chart somewhere, e.g. 
https://downloads.apache.org/polaris-tools/console/helm-chart/.
   
   cc @jbonofre 



##########
console/helm/NOTICE:
##########
@@ -0,0 +1,5 @@
+Apache Polaris

Review Comment:
   ```suggestion
   Apache Polaris Console
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to