-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no matches for kind "StatefulSet" in version "apps/v1beta1" on strapdata/elassandra chart #9
Comments
Hi Andrea,
Yes, k8s 1.18 involves some modifications, and these will probably be not compatible with some old versions of Kubernetes.
Could you summit a pull request to keep the credit of your modification in the GitHub history ? (Clone the repo, checkout a new branch, apply your fix, and create a PR from that branch).
Thanks,
Vincent.
… On 16 Jul 2020, at 11:48, Andrea Nicola ***@***.***> wrote:
Hi,
today i tried to install strapdata/elassandra chart on a kubernetes v 1.18 cluster.
Setup failed with error "no matches for kind "StatefulSet" in version "apps/v1beta1".
I dug into templates/statefulset.yaml to change apiVersion to v1 like suggested in similar issues with statefulsets and i faced a new error:
"Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(StatefulSet.spec): missing required field "selector" in io.k8s.api.apps.v1.StatefulSetSpec"
I added a selector object in spec duplicating the metadata labels and i receveid a new error:
Error: StatefulSet.apps "elassandra" is invalid: spec.template.metadata.labels: Invalid value: map[string]string{"app":"elassandra", "release":"elassandra"}: selector does not match template labels
So I changed selector labels copying spec.template.metadata.labels section and the chart deployed correctly (or at least it seems to be!)
The resulting yaml looks like this:
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ template "elassandra.fullname" . }}
labels:
app: {{ template "elassandra.name" . }}
chart: {{ template "elassandra.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
selector:
matchLabels:
app: {{ template "elassandra.name" . }}
release: {{ .Release.Name }}
serviceName: {{ template "elassandra.fullname" . }}
replicas: {{ .Values.config.cluster_size }}
podManagementPolicy: {{ .Values.podManagementPolicy }}
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
app: {{ template "elassandra.name" . }}
release: {{ .Release.Name }}
...
[statefulset.zip](https://github.com/strapdata/helm-charts/files/4930663/statefulset.zip)
I attach the full modified templates/statefulset.yaml
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#9>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ACOMPGL7UMZYGEUL227RBJLR33EFRANCNFSM4O35WGYQ>.
|
Done! keep up the good work Vincent! |
@vroyer Could we get that PR merged? I'm having the same issue, and the fix is just sitting there 😄 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
today i tried to install strapdata/elassandra chart on a kubernetes v 1.18 cluster.
Setup failed with error "no matches for kind "StatefulSet" in version "apps/v1beta1".
I dug into templates/statefulset.yaml to change apiVersion to v1 like suggested in similar issues with statefulsets and i faced a new error:
"Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(StatefulSet.spec): missing required field "selector" in io.k8s.api.apps.v1.StatefulSetSpec"
I added a selector object in spec duplicating the metadata labels and i receveid a new error:
Error: StatefulSet.apps "elassandra" is invalid: spec.template.metadata.labels: Invalid value: map[string]string{"app":"elassandra", "release":"elassandra"}:
selector
does not match templatelabels
So I changed selector labels copying spec.template.metadata.labels section and the chart deployed correctly (or at least it seems to be!)
The resulting yaml looks like this:
statefulset.zip
I attach the full modified templates/statefulset.yaml
The text was updated successfully, but these errors were encountered: