1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-03-23 20:32:53 +02:00

12 Commits

Author SHA1 Message Date
Thomas Anderson
10f2e209d6
Secured kubernetes backend configuration ()
Follow up of 
2024-01-15 03:59:08 +01:00
qwerty287
b9f6f3f9fb
Replace goimports with gci ()
`gci` seems to be much more strict.
2024-01-14 18:22:06 +01:00
Thomas Anderson
0611fa9b32
Added protocol in port configuration ()
Closes  
2024-01-12 23:57:24 +01:00
6543
d1fe86b7be
Use UUID as podName and cleanup arguments for Kubernetes backend ()
to much args are just horrible to maintain. And we already have it nice
structured stored as step.
2024-01-11 16:32:37 +01:00
qwerty287
768fd71841
Enable some linters ()
Mostly those that did not require much work.

From 

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-01-09 21:35:37 +01:00
Thomas Anderson
01a955ed0e
Kubernetes refactor ()
Kubernetes backend refactoring and tests

---------
Co-authored-by: 6543 <6543@obermui.de>
2023-12-19 04:53:52 +01:00
Nikolai Rodionov
f7f78b2a3f
feat(k8s): Add a port name to service definition ()
It should cover this issue:  https://github.com/woodpecker-ci/woodpecker/issues/2931

To sum up, when several ports need to be specified, they must be named
2023-12-19 02:38:18 +01:00
J-Ha
9af71dcc98
Use unique label selector for pod label for kubernetes services ()
Co-authored-by: Julian Haseleu <julian.haseleu@dreamit.de>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2023-11-04 10:35:37 +01:00
Thomas Anderson
de53b906e8
Add ports into pipeline backend step model ()
Closes .


[Pipeline](https://woodpecker-ci.org/docs/next/usage/services#complete-pipeline-example):
```yaml
services:
  database:
    image: mysql
    environment:
      - MYSQL_DATABASE=test
      - MYSQL_ROOT_PASSWORD=example
    ports:
      - 3306

steps:
  get-version:
    image: ubuntu
    commands:
      - ( apt update && apt dist-upgrade -y && apt install -y mysql-client 2>&1 )> /dev/null
      - sleep 60s # need to wait for mysql-server init
      - echo 'SHOW VARIABLES LIKE "version"' | mysql -uroot -hdatabase test -pexample
```

Service:
```yaml
apiVersion: v1
kind: Service
metadata:
  name: wp-01hdq6gbkw1mn6k1655fs3rntf-0-services-0
  namespace: woodpecker-runtime
  ...
  selfLink: >-
    /api/v1/namespaces/woodpecker-runtime/services/wp-01hdq6gbkw1mn6k1655fs3rntf-0-services-0
status:
  loadBalancer: {}
spec:
  ports:
    - protocol: TCP
      port: 3306
      targetPort: 3306
  selector:
    step: database
  clusterIP: 10.43.180.120
  clusterIPs:
    - 10.43.180.120
  type: ClusterIP
  sessionAffinity: None
  ipFamilies:
    - IPv4
  ipFamilyPolicy: SingleStack
  internalTrafficPolicy: Cluster
```
2023-11-02 04:12:41 +01:00
qwerty287
e74115027b
Add some tests ()
and some cleanups
2023-10-28 13:37:54 +02:00
6543
d253f8cc30
Make sure we dont have hidden options for backend and pipeline compiler ()
move options based on **os.Getenv** into flags

---------
*Sponsored by Kithara Software GmbH*
2023-08-07 21:13:26 +02:00
Anbraten
3b0263442a
Adding initial version of Kubernetes backend ()
Co-authored-by: laszlocph <laszlo@laszlo.cloud>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Rynoxx <rynoxx@grid-servers.net>
2022-09-05 06:01:14 +02:00