Closed github-actions[bot] closed 2 years ago
There is a build error in the example:
cd examples/
make
shell: /usr/bin/bash -e {0}
cd create_pod; make
make[1]: Entering directory '/home/runner/work/c/c/examples/create_pod'
gcc main.c -g -I../../kubernetes/include -I../../kubernetes/model -I../../kubernetes/api -I../../kubernetes/config -L../../kubernetes/build -lkubernetes -lyaml -lwebsockets -L/usr/local/lib -o create_pod_bin
main.c: In function ‘create_a_pod’:
main.c:26:[3](https://github.com/kubernetes-client/c/runs/6748985393?check_suite_focus=true#step:8:3)0: error: ‘kubernetes_v1_container_IMAGEPULLPOLICY_IfNotPresent’ undeclared (first use in this function)
26 | con->image_pull_policy = kubernetes_v1_container_IMAGEPULLPOLICY_IfNotPresent;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:26:30: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [Makefile:[7](https://github.com/kubernetes-client/c/runs/6748985393?check_suite_focus=true#step:8:8): all] Error 1
make[1]: Leaving directory '/home/runner/work/c/c/examples/create_pod'
make: *** [Makefile:2: all] Error 2
Error: Process completed with exit code 2.
The type of imagePullPolicy
changes from enum
to string
. We can fix this issue by changing the example code from
con->image_pull_policy = kubernetes_v1_container_IMAGEPULLPOLICY_IfNotPresent;
to
con->image_pull_policy = strdup("IfNotPresent");
I will add a commit to fix these.
@ityuhui commit added, please take another look.
/lgtm /approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: github-actions[bot], ityuhui
The full list of commands accepted by this bot can be found here.
The pull request process is described here
The code change looks good to me. But this PR didn't trigger the build and test action.
I will close and reopen this PR to try to trigger the build and test.
Refer to PRs created don't trigger other actions