Comments (11)
I had a quick chat with @blazember
I think we need to fix this in hazelcast-kubernetes plugin by introducing a new parameter discovery-mode: API | DNS
and deprecating service-dns
. If discovery-mode
is DNS
then service-name
can be used instead of service-dns
from charts.
I tried the same and it does not work. However, when I fetched the helm chart and modified locally, helm install .
creates correct ConfigMap.
from charts.
I checked that one again and I see it is similar to that issue.
helm/helm#5534
Apparently, When you do helm install hazelcast/hazelcast -f values.yaml
, helm merges both local and remote yaml file, we need to set service-name: null
as @seenimurugan did.
local values.yaml
yaml:
hazelcast:
network:
join:
multicast:
enabled: false
kubernetes:
enabled: true
service-dns: ${serviceName}
service-name: null
management-center:
enabled: ${hazelcast.mancenter.enabled}
url: ${hazelcast.mancenter.url}
It is good so far but then we receive an exception with that configuration and it is thrown by Hazelcast.
xception in thread "main" com.hazelcast.config.InvalidConfigurationException: The configuration entry under hazelcast/network/join/kubernetes/service-name is null. Please check if the provided YAML configuration is well-indented and no blocks started without sub-nodes.
at com.hazelcast.config.yaml.YamlDomChecker.reportNullEntryOnConcretePath(YamlDomChecker.java:71)
at com.hazelcast.config.yaml.YamlDomChecker.check(YamlDomChecker.java:47)
at com.hazelcast.config.yaml.YamlDomChecker.check(YamlDomChecker.java:50)
at com.hazelcast.config.yaml.YamlDomChecker.check(YamlDomChecker.java:50)
at com.hazelcast.config.yaml.YamlDomChecker.check(YamlDomChecker.java:50)
at com.hazelcast.config.YamlConfigBuilder.parseAndBuildConfig(YamlConfigBuilder.java:153)
at com.hazelcast.config.YamlConfigBuilder.build(YamlConfigBuilder.java:131)
at com.hazelcast.config.YamlConfigBuilder.build(YamlConfigBuilder.java:122)
at com.hazelcast.instance.HazelcastInstanceFactory.newHazelcastInstance(HazelcastInstanceFactory.java:136)
at com.hazelcast.core.Hazelcast.newHazelcastInstance(Hazelcast.java:91)
at com.hazelcast.core.server.StartServer.main(StartServer.java:46)
Apparently, we do not allow null passing in yaml files to Hazelcast Configuration.
Do you have any suggestions here @leszko @blazember ?
from charts.
The workaround for this (or maybe even a proper solution) is to set service-name:
to an empty string.
I think we'll not introduce discovery-mode API | DNS
, but rather extract the DNS Lookup discovery as a separate modele (or include in hazelcast/hazelcast).
from charts.
Hi,
I have exactly the same problem of @mesutcelik (#58 (comment)).
No matter I set either
service-name: null
service-name:
(note the white space after the ":")service-name:
(no white space after the ":")service-name: ~
I get always the exception
InvalidConfigurationException: The configuration entry under hazelcast/network/join/kubernetes/service-name is null. Please check if the provided YAML configuration is well-indented and no blocks started without sub-nodes.
For completeness, I'm using Hazelcast 3.12.6 (same behavior also with the 3.12.5) deployed with its helm chart version 2.10.0 on a Rancher cluster (version 2.2.8).
This is the YAML file passed with custom values:
# Hazelcast custom Helm chart template
---
image:
repository: "nexus.internal/hazelcast/hazelcast"
tag: "3.12.6"
cluster:
memberCount: 1
metrics:
enabled: true
rbac:
enabled: false
serviceAccount:
create: false
mancenter:
enabled: false
hazelcast:
yaml:
hazelcast:
group:
name: tomcat
network:
join:
kubernetes:
enabled: true
service-dns: ${serviceName}.${namespace}.svc.cluster.local
service-name:
(note again the white space after the ":" of service-name
).
This is the configmap containing the "hazelcast.yaml" file created by the helm chart:
apiVersion: v1
data:
hazelcast.yaml: |-
hazelcast:
group:
name: tomcat
management-center:
enabled: ${hazelcast.mancenter.enabled}
url: ${hazelcast.mancenter.url}
network:
join:
kubernetes:
enabled: true
namespace: ${namespace}
resolve-not-ready-addresses: true
service-dns: ${serviceName}.${namespace}.svc.cluster.local
service-name: null
multicast:
enabled: false
rest-api:
enabled: true
endpoint-groups:
HEALTH_CHECK:
enabled: true
kind: ConfigMap
metadata:
creationTimestamp: "2020-02-12T16:04:44Z"
labels:
app.kubernetes.io/instance: hazelcast
app.kubernetes.io/managed-by: Tiller
app.kubernetes.io/name: hazelcast
helm.sh/chart: hazelcast-2.10.0
io.cattle.field/appId: hazelcast
name: hazelcast-configuration
namespace: hazelcast
resourceVersion: "22916230"
selfLink: /api/v1/namespaces/hazelcast/configmaps/hazelcast-configuration
uid: 62b1514b-4db1-11ea-b80a-00505682af12
You can see that service-name
has been automagically assigned the null
value.
Of course, by setting either:
service-name: ""
service-name: ''
(two single quotes)- leaving completely away the
service-name
entry
Hazelcast claims about the incorrect usage of service-name
together with service-dns
. This means that the yaml passed above is syntactically correct.
Any idea/feedback?
from charts.
I think we need to fix it in the hazelcast-kubernetes
plugin to treat empty strings the same as null. Added a "bug" label.
from charts.
Created an issue in hazelcast-kubernetes: hazelcast/hazelcast-kubernetes#197
from charts.
The workaround for this issue is to create ConfigMap
with Hazelcast configuration manually and use existingConfigMap.
from charts.
@leszko I see k8s issue is merged and closed so can we close this issue? Do we need any readme update?
from charts.
Let's close it when Hazelcast 4.1
is released and Helm Chart is updated.
from charts.
Fixed by #170
It should work fine starting from the chart version 3.5.0
from charts.
Related Issues (20)
- Ability To Create a PodDisruptionBudget HOT 1
- mancenter serialization configuration ignored
- Issue with installation via FluxCD HOT 3
- Change 'hotRestart' parameters to 'persistence' HOT 1
- How to set class-cache-mode OFF in user-code-deployment HOT 1
- add prometheusrule to the chart HOT 3
- Ingress with Prefix path : css and js files not found HOT 1
- Port name in hazelcast Service must be configurable or renamed so it's compliant with Istio naming standards HOT 1
- Service Account cannot list statefulsets HOT 2
- Misleading setting "gracefulShutdown.enabled"
- Question: What is the correct usage of `service.name` HOT 13
- Hazelcast Helm chart 5.7.1 missing from index HOT 2
- Configuring ringbuffer capacity through helm HOT 5
- Service port name does not match port name k8s discovery is looking for in Hazelcast > 5.3.0 HOT 1
- Permit enablement of CP subsystem in hazelcast.yaml for hazelcast chart HOT 4
- OIDC configmap HOT 1
- Mancenter Clustered JMX
- Add possibility to configure keda autoscaler for hazlecast and management-center
- Add the possibility to configure a VirtualService for hazelcast-management-center instead Ingress
- Some securityContext parameters (e.g., seccompProfile) not rendered
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from charts.