Route iuclabs runner package installs through artifactapi #617
@@ -0,0 +1,4 @@
|
||||
---
|
||||
- op: add
|
||||
path: /spec/template/spec/initContainers
|
||||
value: []
|
||||
@@ -0,0 +1,33 @@
|
||||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1alpha1
|
||||
kind: Component
|
||||
|
||||
resources:
|
||||
- networkpolicy.yaml
|
||||
|
||||
generatorOptions:
|
||||
disableNameSuffixHash: true
|
||||
|
||||
configMapGenerator:
|
||||
- name: runner-artifactapi
|
||||
namespace: iuclabs-runners
|
||||
literals:
|
||||
- PIP_INDEX_URL=https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/pypi/simple
|
||||
- UV_DEFAULT_INDEX=https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/pypi/simple
|
||||
- GOPROXY=https://artifactapi.k8s.syd1.au.unkin.net/api/v1/virtual/go,direct
|
||||
- npm_config_registry=https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/npmjs/
|
||||
- YARN_NPM_REGISTRY_SERVER=https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/npmjs
|
||||
- COREPACK_NPM_REGISTRY=https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/npmjs
|
||||
- SSL_CERT_FILE=/etc/ssl/combined/ca-certificates.crt
|
||||
- REQUESTS_CA_BUNDLE=/etc/ssl/combined/ca-certificates.crt
|
||||
|
||||
patches:
|
||||
- path: init-containers-list.yaml
|
||||
target:
|
||||
group: actions.github.com
|
||||
kind: AutoscalingRunnerSet
|
||||
name: iuclabs-(k8s|infra|release)
|
||||
- path: scaleset-patch.yaml
|
||||
target:
|
||||
group: actions.github.com
|
||||
kind: AutoscalingRunnerSet
|
||||
@@ -0,0 +1,25 @@
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: egress-artifactapi
|
||||
namespace: iuclabs-runners
|
||||
spec:
|
||||
podSelector:
|
||||
matchExpressions:
|
||||
- key: runners.unkin.net/scale-set
|
||||
operator: Exists
|
||||
policyTypes:
|
||||
- Egress
|
||||
egress:
|
||||
# artifactapi via traefik-internal; kube-proxy DNATs its LB IP to these pods
|
||||
- to:
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: traefik-system
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: traefik-internal-traefik-system
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 443
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
# public roots + internal CA in one bundle, so SSL_CERT_FILE keeps github.com trusted
|
||||
- op: add
|
||||
path: /spec/template/spec/initContainers/-
|
||||
value:
|
||||
name: combine-certs
|
||||
image: ghcr.io/actions/actions-runner:2.338.2
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- cat /etc/ssl/certs/ca-certificates.crt /etc/vault-ca/ca.crt > /etc/ssl/combined/ca-certificates.crt
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 32Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 64Mi
|
||||
volumeMounts:
|
||||
- name: vault-ca-cert
|
||||
mountPath: /etc/vault-ca
|
||||
readOnly: true
|
||||
- name: combined-certs
|
||||
mountPath: /etc/ssl/combined
|
||||
- op: add
|
||||
path: /spec/template/spec/containers/0/envFrom
|
||||
value:
|
||||
- configMapRef:
|
||||
name: runner-artifactapi
|
||||
- op: add
|
||||
path: /spec/template/spec/containers/0/volumeMounts/-
|
||||
value:
|
||||
name: combined-certs
|
||||
mountPath: /etc/ssl/combined
|
||||
readOnly: true
|
||||
- op: add
|
||||
path: /spec/template/spec/volumes/-
|
||||
value:
|
||||
name: combined-certs
|
||||
emptyDir: {}
|
||||
@@ -43,7 +43,7 @@ spec:
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 8200
|
||||
# artifactapi via traefik-internal; kube-proxy DNATs its LB IP to these pods
|
||||
# container-base fetches the internal CA RPM over http from artifactapi before TLS trust exists
|
||||
- to:
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
@@ -52,8 +52,5 @@ spec:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: traefik-internal-traefik-system
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 443
|
||||
# container-base fetches the internal CA RPM over http from artifactapi before TLS trust exists
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
|
||||
@@ -43,14 +43,3 @@ spec:
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 8200
|
||||
# artifactapi via traefik-internal; kube-proxy DNATs its LB IP to these pods
|
||||
- to:
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: traefik-system
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: traefik-internal-traefik-system
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 443
|
||||
|
||||
@@ -15,6 +15,7 @@ components:
|
||||
- components/iuclabs-release
|
||||
- components/iuclabs-dind
|
||||
- components/iuclabs-build
|
||||
- components/artifactapi
|
||||
|
||||
generatorOptions:
|
||||
disableNameSuffixHash: true
|
||||
|
||||
Reference in New Issue
Block a user