Balamurali Ananthan
07/11/2023, 4:07 PMhelm upgrade --install -n gooddata-cn gooddata-cn cwan/gooddata-cn $VALUES
20:35:32 Error: UPGRADE FAILED: failed to create patch: unable to find api field in struct Probe for the json field "grpc" && failed to create patch: unable to find api field in struct Probe for the json field "grpc"
How do I proceed with the installation? Thanks muchFrancisco Antunes
07/11/2023, 5:06 PMBalamurali Ananthan
07/11/2023, 5:21 PMBalamurali Ananthan
07/11/2023, 5:22 PMFrancisco Antunes
07/11/2023, 5:25 PMFrancisco Antunes
07/11/2023, 5:43 PMBalamurali Ananthan
07/11/2023, 5:46 PMFrancisco Antunes
07/11/2023, 5:49 PMBalamurali Ananthan
07/11/2023, 5:51 PMBalamurali Ananthan
07/12/2023, 4:30 AMRobert Moucha
07/12/2023, 10:31 AMlivenessProbe:
grpc:
port: 6889
Robert Moucha
07/12/2023, 10:32 AMRobert Moucha
07/12/2023, 10:35 AMkubectl explain pod.spec.containers.livenessProbe.grpc
It should return a brief description from JSON API schema downloaded from your clusterRobert Moucha
07/12/2023, 10:36 AMerror: field "grpc" does not exist
then your cluster doesn't support this attributeRobert Moucha
07/12/2023, 10:57 AMkubectl version -o yaml
(notably the serverVersion
part) and also helm version
Balamurali Ananthan
07/12/2023, 2:07 PM% kubectl explain pod.spec.containers.livenessProbe.grpc
KIND: Pod
VERSION: v1
RESOURCE: grpc <Object>
DESCRIPTION:
GRPC specifies an action involving a GRPC port. This is a beta field and
requires enabling GRPCContainerProbe feature gate.
FIELDS:
port <integer> -required-
Port number of the gRPC service. Number must be in the range 1 to 65535.
service <string>
Service is the name of the service to place in the gRPC HealthCheckRequest
(see <https://github.com/grpc/grpc/blob/master/doc/health-checking.md>).
If this is not specified, the default behavior is defined by gRPC.
Balamurali Ananthan
07/12/2023, 2:08 PM% kubectl version -o yaml
clientVersion:
buildDate: "2021-07-15T21:04:39Z"
compiler: gc
gitCommit: ca643a4d1f7bfe34773c74f79527be4afd95bf39
gitTreeState: clean
gitVersion: v1.21.3
goVersion: go1.16.6
major: "1"
minor: "21"
platform: darwin/amd64
serverVersion:
buildDate: "2023-03-30T14:01:58Z"
compiler: gc
gitCommit: 4ac1389d4c3eefaabbd9fa31782fcbfd72e6e6e6
gitTreeState: clean
gitVersion: v1.25.8-gke.1000
goVersion: go1.19.7 X:boringcrypto
major: "1"
minor: "25"
platform: linux/amd64
WARNING: version difference between client (1.21) and server (1.25) exceeds the supported minor version skew of +/-1
Balamurali Ananthan
07/12/2023, 2:08 PM% helm version
version.BuildInfo{Version:"v3.10.2", GitCommit:"50f003e5ee8704ec937a756c646870227d7c8b58", GitTreeState:"clean", GoVersion:"go1.19.3"}
Robert Moucha
07/12/2023, 2:55 PMkubectl
is outdated - it may cause troubles when using it to access 1.25 clusters, but it is not the cause of your issue.
The Kubernetes API reports it understands the livenessProbe.grpc
objects (as expected, on 1.25).Balamurali Ananthan
07/12/2023, 5:41 PMRobert Moucha
07/13/2023, 7:30 AMhelm pull gooddata/gooddata-cn --version 2.3.2 --untar -d gdcn-chart
2. edit file gdcn-chart/gooddata-cn/templates/pdf-stapler-service/deployment.yaml
3. There are two conditions checking kubernetes if minor version is greater or equal to "24": {{- if ge (int .Capabilities.KubeVersion.Minor) 24 }}
4. Raise the value 24
to some higher number, like 30
. These two lines should be: {{- if ge (int .Capabilities.KubeVersion.Minor) *30* }}
5. These changes will bypass the offending grpc
probe method and will use older, yet still working exec
method.
6. Upgrade your helm release using this extracted chart:
helm upgrade --install -n gooddata-cn gooddata-cn ./gdcn-chart/gooddata-cn $VALUES
(the ./gdcn-chart
is the directory where you extracted helm chart).
Sorry for the inconvenience, we'll need to investigate this problem deeper.Balamurali Ananthan
07/13/2023, 6:24 PMcharts/gooddata-cn-2.3.0/templates/tabular-exporter/deployment.yaml
. Do I change here as well?Balamurali Ananthan
07/13/2023, 6:44 PMRobert Moucha
07/14/2023, 7:34 AMgrpc:
method is used also in tabular-exported. I didn't took this into account, because tabular-exporter didn't changed between 2.2.0 and 2.3.0 so there's no reason why it should stop suddenly working.
Can you please perform the following: helm upgrade --install -n gooddata-cn gooddata-cn ./gdcn-chart/gooddata-cn *--dry-run* $VALUES > /tmp/manifests.yaml
And then, examine the output file /tmp/manifests.yaml and search for grpc:
. There will be one occurrence in Secret gooddata-cn-dex
- this is ok, it's a part of Dex config file.
I'm particularly curious if there are any other grpc:
methods in livenessProbe
and readinessProbe
objects and in which deployments.Balamurali Ananthan
07/14/2023, 6:15 PMcontainers:
- name: pdf-stapler-service
securityContext:
runAsUser: 1000
image: "gooddata/pdf-stapler-service:2.3.0"
imagePullPolicy: Always
ports:
- name: grpc
containerPort: 6889
protocol: TCP
- name: actuator
containerPort: 8287
protocol: TCP
livenessProbe:
exec:
command: ["/usr/local/bin/grpc-health-probe", "-addr=:6889"]
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 5
readinessProbe:
exec:
command: ["/usr/local/bin/grpc-health-probe", "-addr=:6889"]
Balamurali Ananthan
07/14/2023, 6:16 PMpdf-stapler-service
and tabular-exporter
containersBalamurali Ananthan
07/14/2023, 6:16 PMRobert Moucha
07/15/2023, 3:47 PMexec:
command: ["/usr/local/bin/grpc-health-probe", "-addr=:6889"]
These probes are of exec:
type, not grpc:
type. So the helm ugprade
is actually trying to set exec
and not grpc
. I really don't know, where the grpc
method comes from.
Can you check the pdf-stapler-service
Deployment directly on your cluster, what probe method is currently set? Chances are that if there's already grpc:
, generated patch fails to replace this method by exec:
for some unknown reason and the resulting object would have both exec and grpc methods set at once, but this is disallowed by k8s api.
Do do following only in case these live deployments contain grpc:
in some of probe definitions. You may fix it by manually editing these deployments.
kubectl -n gooddata-cn edit deployment gooddata-cn-pdf-stapler-service # ( or gooddata-cn-tabular-exporter)
An text editor opens up with deployment manifest. Find the livenessProbe
and readinessProbe
sections and delete them completely, including all nested fields.
Save the file and exit editor. The modified deployment will restart its pods.
Then, retry the helm upgrade
.
Another option, in case the previous attempt fails, you can add --force
to the helm upgrade command line. This flag will make the whole deployment recreated by PUTting the full final manifest instead of simply PATCHing the supposed changes.Robert Moucha
07/18/2023, 7:26 AMBalamurali Ananthan
07/18/2023, 2:07 PMBalamurali Ananthan
07/18/2023, 4:02 PMlivenessProbe
and readinessProbe
sections and saved it. Those modified deployments restarted its pods and that worked like a charm. I have updated Gooddata from 2.2.0 to 2.3.2 successfully in GCP. Thank you very much for all the detailed suggestions.Balamurali Ananthan
07/18/2023, 4:04 PMRobert Moucha
07/18/2023, 5:25 PM