Comments (8)
@funkypenguin you are the project main maintainer as I understand. Do u have some ideas?
from k8s.
Hey @yurymkomarov!
Looking at the template (below), both hosts
and paths
seem to be interpreted using range
:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path | default "/" }}
backend:
Therefore I'd suggest that you try something like this?
ingress = {
enabled = true
annotations = { "kubernetes.io/ingress.class" = "nginx" }
hosts = [{
host = "portainer.${local.tfstate["route53"]["internal"]["name"]}"
paths = [{
path = "/"
}]
}]
}
If this works, then we probably have to update the README and values.yaml to more clearly indicate how to pass these arguments to the chart!
Cheers!
D
from k8s.
Not sure is related to the same thing, but the result is the same. I am using the example from the Portainer website.
helm install --create-namespace -n portainer portainer portainer/portainer \ --set service.type=ClusterIP \ --set ingress.enabled=true \ --set ingress.annotations='kubernetes.io/ingress.class: nginx' \ --set ingress.hosts.host=portainer.example.io
and I receive an error
coalesce.go:196: warning: cannot overwrite table with non table for annotations (map[])
coalesce.go:199: warning: destination for hosts is a table. Ignoring non-table value [map[host: paths:[]]]
Error: template: portainer/templates/ingress.yaml:31:15: executing "portainer/templates/ingress.yaml" at <.host>: can't evaluate field host in type interface {}
Can you please tell me what I am doing wrong.
Many thanks
from k8s.
@funkypenguin do you mind having a look at @MarkLFT problem?
from k8s.
Just to let you know I have got around this issue by using a value.yaml and put all the ingress values in there. So I think the issue here is just I cannot format the set values correctly.
from k8s.
Hello @funkypenguin!
I had the same problem today and I solved this way.
My first attempt was to create the required structure in values.yaml
or in my custom values.yaml
file and then execute helm template/install
with flag -f <path_to_my_values.yaml>
.
I create the structure like this (my custom values.yaml)
ingress:
enabled: true
annotations: {}
hosts:
- host: 'portainer.minikube.local'
paths:
- path: '/'
And this is the structure of vaules.yaml (default)
ingress:
enabled: false
annotations: {}
hosts:
- host:
paths: []
What can we see there? Right! There is no ingress.hosts[].paths[].path
My second attempt was to pass the right structure by --set flags.
helm template portainer/portainer --set ingress.hosts[0].host="portainer.minikube.local" --set ingress.hosts[0].paths[0].path="/"
After that templating was successfull
# Source: portainer/templates/ingress.yaml
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: RELEASE-NAME-portainer
namespace: portainer1
labels:
helm.sh/chart: portainer-1.0.14
app.kubernetes.io/name: portainer
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/version: "ce-latest-ee-2.4.0"
app.kubernetes.io/managed-by: Helm
spec:
rules:
- host: "portainer.minikube.local"
http:
paths:
- path: /
backend:
serviceName: RELEASE-NAME-portainer
servicePort: 9000
So, the problem is that there is no mention in the documentation about passing custom variables by array and not by map.
from k8s.
Dear @funkypenguin
This is caused because networking.k8s.io/v1beta1
is deprecated since 1.19.
Ingress
The extensions/v1beta1 and networking.k8s.io/v1beta1 API versions of Ingress is no longer served as of v1.22.
- Migrate manifests and API clients to use the networking.k8s.io/v1 API version, available since v1.19.
- All existing persisted objects are accessible via the new API
- Notable changes:
spec.backend
is renamed tospec.defaultBackend
- The backend
serviceName
field is renamed toservice.name
- Numeric backend
servicePort
fields are renamed toservice.port.number
- String backend
servicePort
fields are renamed toservice.port.name
pathType
is now required for each specified path. Options arePrefix
,Exact
, andImplementationSpecific
. To match the undefinedv1beta1
behavior, useImplementationSpecific
.IngressClass
The networking.k8s.io/v1beta1 API version of IngressClass is no longer served as of v1.22.
- Migrate manifests and API clients to use the networking.k8s.io/v1 API version, available since v1.19.
- All existing persisted objects are accessible via the new API
- No notable changes
__Deprecated API Migration Guide
In file: ingress.yml
Thanks
from k8s.
Any Updates for this topic? Because we currently cannot update Portainer because of this.
There are pending Merge Requests, which will solve this topic: #91 or #89
from k8s.
Related Issues (20)
- Ingress Annotations not saved or applied
- Create Template from Stack.
- Unable to save a namespace unless Cluster Setup Allow Resource Over-commit selected.
- Unable to set an ingress path based on the root path.
- helm value persistence.enabled is only in docs, not in the code HOT 1
- Please add loadBalancerIP option to helm chart
- portainer-lb.yaml - cannot unmarshal object into Go struct field ClusterRoleBinding.subjects of type []v1.Subject
- Attempting to fire up Portainer using Helm chart on Microk8s 1.27 using TLS Cert & key fails
- PVC Template Uses Deprecated Volume Annotation For storageClass HOT 1
- Portainer server ServiceAccount HOT 1
- Beef up CI testing HOT 1
- Include namespace in manifests
- Update EE in chart to 2.0.1
- Issue with PVC not ready HOT 4
- Initial setup with config maps or secrets
- Problem with hosts and tls in Helm chart HOT 2
- liveness check failed HOT 1
- No matches for kind "Ingress" in version "networking.k8s.io/v1beta1" HOT 1
- ClusterIP instruction in NOTES.txt is not complete
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 k8s.