hasura / gitkube-example

An example repo to be used with gitkube: git push to deploy on to Kubernetes
MIT License
43 stars 19 forks source link

the step 5 'Git push and deploy' execute failed #8

Closed currycan closed 4 years ago

currycan commented 4 years ago

Hi, I follow the document to run a demo in my k8s cluster. The step from 1 to 4 execute well. But the last step to deploy the service failed. The k8s cluster version is 1.17( I also tried in 1.15, it fail too) The main info is as follow:

[root@k8s-master-01 ~]#  kubectl get pods -n kube-system | grep gitkube
gitkube-controller-7f797f8f4b-knpv4       1/1     Running   0          12m
gitkubed-6cf5b7cc4f-gvp6d                 1/1     Running   0          12m
[root@k8s-master-01 ~]# kubectl get svc -n kube-system gitkubed
NAME       TYPE           CLUSTER-IP     EXTERNAL-IP     PORT(S)        AGE
gitkubed   LoadBalancer   172.23.7.132   10.177.92.244   22:31821/TCP   12m
[root@k8s-master-01 ~]# kubectl get remotes myremote -o yaml             
apiVersion: gitkube.sh/v1alpha1
kind: Remote
metadata:
  creationTimestamp: "2019-12-17T07:53:52Z"
  generation: 2
  name: myremote
  namespace: default
  resourceVersion: "314985"
  selfLink: /apis/gitkube.sh/v1alpha1/namespaces/default/remotes/myremote
  uid: d268bf52-5cef-450b-8c5f-dbe417b944ec
spec:
  authorizedKeys:
  - |
    ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCt5DRW7e3i2zyNnesiNkg2cXbtiSljh2ornhLrnDtiX2sN8qcSFWcjmFtQ67zP897fe7vKl8GdAdt0cpIJeGe4tZgDaksG/hbC4WS1W31NrALkRF+DdGJUa1zuVvdO4svFXdbz4tHb45dnbAgmsoFlUFBlM/sx7lBBAYgLV2C/u26R23Qyq3KV53vko0nR19tPMA3gcmX3D1yoQ1NNojQGEs7D47dViGQbnfh5eZo253xIt40Pcwusk9M0dbw3biZFZDl9Znb0SGghW6FROXckU4WpVLgkZeOLGCTrpslm+Ws3IHqzOUO0ai7wk9YIIF1JRkl5pOQbaUBUUq0x2dsx root@k8s-master-01
  deployments:
  - containers:
    - dockerfile: microservices/nginx/Dockerfile
      name: www
      path: microservice/nginx
    name: www
  manifests:
    helm: {}
    path: manifests
  registry:
    credentials:
      secretKeyRef:
        key: ""
      secretRef: myremote-regsecret
    url: docker.io/currycan
status:
  remoteUrl: ssh://default-myremote@10.177.92.244/~/git/default-myremote
  remoteUrlDesc: ""
[root@k8s-master-01 ~]

I'm meeting some problems right now with the git push example master command.

[root@k8s-master-01 mono-repo]#   git push myremote master
Counting objects: 17, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (14/14), done.
Writing objects: 100% (17/17), 3.73 KiB | 0 bytes/s, done.
Total 17 (delta 0), reused 0 (delta 0)
remote: Gitkube build system : Tue Dec 17 07:55:27 UTC 2019: Initialising
remote: 
remote: Creating the build directory
remote: Checking out 'master:5f17cc8c784f05da150e8da8129cae4dca227239' to '/home/default-myremote/build/default-myremote'
remote: 
remote: Found manifests directory
remote: 
remote: Applying...
remote: W1217 07:55:28.786844     209 factory_object_mapping.go:423] Failed to download OpenAPI (the server could not find the requested resource), falling back to swagger
remote: error validating "/home/default-myremote/build/default-myremote/manifests/nginx-deployment.yaml": error validating data: the server could not find the requested resource; if you choose to ignore these errors, turn validation off with --validate=false
remote: error validating "/home/default-myremote/build/default-myremote/manifests/nginx-svc.yaml": error validating data: the server could not find the requested resource; if you choose to ignore these errors, turn validation off with --validate=false
To ssh://default-myremote@10.177.92.244/~/git/default-myremote
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'ssh://default-myremote@10.177.92.244/~/git/default-myremote'
[root@k8s-master-01 mono-repo]# 
friend0 commented 4 years ago

@currycan What did you do to resolve this? Currently running into this problem