kubo/bin
Filip Rembiałkowski 8391232c24
fix: inlude symlinks in scanning for init scripts
When the `/container-init.d` directory is mounted from a secret in k8s, the file type could be a symbolic link not a regular file.

Steps to reproduce:

Create init file

```bash
mkdir ipfs-container-init-d
echo "ipfs config Routing.Type dhtserver" > ipfs-container-init-d/01_init.sh
```

Create this kustomization.yaml file:

```yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
configMapGenerator:
- name: ipfs-container-init-d
  files:
    - ipfs-container-init-d/01_init.sh
resources:
- k8s.yaml
```

Create a StatefulSet with the secret volume mount:

```yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: ipfs
spec:
  selector:
    matchLabels:
      app: ipfs
  replicas: 1
  template:
    metadata:
      labels:
        app: ipfs
    spec:
      containers:
      - name: kubo
        image: ipfs/kubo:v0.38.2  # https://github.com/ipfs/kubo/releases/tag/v0.38.2
        ports:
        - containerPort: 4001
          protocol: TCP
        - containerPort: 4001
          protocol: UDP
        - containerPort: 5001
        - containerPort: 8080
        volumeMounts:
        - name: ipfs-container-init-d
          mountPath: /container-init.d
      volumes:
      - name: ipfs-container-init-d
        configMap:
          name: ipfs-container-init-d
```

Apply with `kubectl apply -k .`

Using `kubectl logs` observe the init script is NOT loaded unless this fix is applied.
2025-11-25 23:10:34 +01:00
..
archive-branches.sh misc: add ai-mirror to excluded branches 2018-03-09 21:50:27 +01:00
container_daemon fix: inlude symlinks in scanning for init scripts 2025-11-25 23:10:34 +01:00
container_init_run feat(docker): /container-init.d for advanced initialization (#6577) 2022-04-12 19:44:03 +02:00
dist_get GOCC implementation & fix in make & build scripts 2019-04-30 21:22:43 -04:00
gencmdref remove unused import (#8787) 2022-03-25 08:48:16 -07:00
get-docker-tags.sh feat: add docker stub for deprecated ipfs/go-ipfs name (#10998) 2025-10-02 20:08:24 +02:00
graphmd diag/net: graphme restyling 2015-01-16 02:11:36 -08:00
ipns-republish core/commands!: remove deprecated object APIs (#10375) 2024-03-22 09:32:30 +01:00
maketarball.sh fix vendoring dependencies when building the source tarball 2019-05-17 12:34:11 -07:00
mkreleaselog chore: update v0.37.0 changelog 2025-08-27 19:15:05 +02:00
push-docker-tags.sh chore(ci): build docker images for staging branch 2024-10-21 15:58:34 +02:00
Rules.mk build: use protoc-gen-* from gomod 2019-06-05 10:57:43 -07:00
test-go-build-platforms refactor(ci): optimize build workflows (#10973) 2025-09-19 14:44:38 +02:00
test-go-fmt fix: go doesn't allow gnu short flags 2021-02-08 12:49:51 -08:00