Coder Social home page Coder Social logo

Comments (8)

sudip-moengage avatar sudip-moengage commented on August 16, 2024

@laszlocph Is there any draft I can use? We use to run woodpecker on a standalone setup. Now, I am migrating it to kuberntes. The dashboard is up. But pipeline failing at clone step saying could not resolve github.com.

What am I missing?

from woodpecker.

laszlocph avatar laszlocph commented on August 16, 2024

Hm, sounds like a DNS issue. Can you resolve domain names, access the internet from other containers?

from woodpecker.

sudip-moengage avatar sudip-moengage commented on August 16, 2024

@laszlocph Yes. But I'm not sure how build containers get spawned in kubernetes. Since they are not spawned as pods, NAT won't happen. Is there any other setup required for kubernetes. For example drone has kubernetes-runner

from woodpecker.

laszlocph avatar laszlocph commented on August 16, 2024

Now, I remember this issue.

Here is how I run the agent in Kubernetes in a DinD setup.
Let me know if it helps.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: woodpecker-agent
  namespace: tools
  labels:
    app: woodpecker-agent
spec:
  selector:
    matchLabels:
      app: woodpecker-agent
  replicas: 2
  template:
    metadata:
      annotations:
      labels:
        app: woodpecker-agent
    spec:
      containers:
      - name: agent
        image: laszlocloud/woodpecker-agent:v0.9.2
        imagePullPolicy: Always
        ports:
        - name: http
          containerPort: 3000
          protocol: TCP
        env:
          - name: DRONE_SERVER
            value: woodpecker.tools.svc.cluster.local:9000
          - name: DRONE_SECRET
            value: "xxx"
          - name: DOCKER_HOST
            value: tcp://localhost:2375
        resources:
          limits:
            cpu: 2
            memory: 2Gi
      - name: dind
        image: "docker:19.03.5-dind"
        env:
        - name: DOCKER_DRIVER
          value: overlay2
        - name: DOCKER_TLS_CERTDIR
          value: "" # due to https://github.com/docker-library/docker/pull/166 & https://gitlab.com/gitlab-org/gitlab-runner/issues/4512
        resources:
          limits:
            cpu: 1
            memory: 2Gi
        securityContext:
          privileged: true

from woodpecker.

sudip-moengage avatar sudip-moengage commented on August 16, 2024

@laszlocph Yes, it worked. Thank you.

Is there any way we can setup autoscaling of agents?

Would you like a documentation PR on how we have setup woodpecker on kubernetes?

from woodpecker.

laszlocph avatar laszlocph commented on August 16, 2024

Thanks @sudip-moengage I eventually did it now.

from woodpecker.

sudip-moengage avatar sudip-moengage commented on August 16, 2024

@laszlocph Hey, currently I'm stuck at registry access.

I'm using EKS and my nodes have proper pull/push access via IAM role. Still I'm not able to run any steps and steps are failing with no basic auth credentials. Do you have any idea how to pass creds for private registries?

I'm using ECR in same account as registry.

from woodpecker.

laszlocph avatar laszlocph commented on August 16, 2024

@laszlocph Hey, currently I'm stuck at registry access.

I'm using EKS and my nodes have proper pull/push access via IAM role. Still I'm not able to run any steps and steps are failing with no basic auth credentials. Do you have any idea how to pass creds for private registries?

I'm using ECR in same account as registry.

Did you sea this one?

https://woodpecker.laszlo.cloud/pipeline/#images-from-private-registries

from woodpecker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.