https://rancher.com/ logo
Title
p

polite-engineer-55788

08/10/2022, 5:06 AM
can I not pass the config using heredoc ?
cat <<EOF | k3d cluster create -c -
apiVersion: <http://k3d.io/v1alpha4|k3d.io/v1alpha4>
kind: Simple
metadata:
  name: my-cluster
servers: 1
agents: 2
image: rancher/v1.24.3-k3s1
ports:
  # Drone CI
  - port: 127.0.0.1:30980:30980
    nodeFilters:
      - agent:*
  # Gitea
  - port: 127.0.0.1:30950:30950
    nodeFilters:
      - agent:*
  # Argo CD
  - port: 127.0.0.1:30080:30080
    nodeFilters:
      - agent:*
registries: 
    name: "${reg_name}"
    host: "0.0.0.0"
    hostPort: "${reg_port}"
    volumes:
      - "${PWD}/.k3s/registry":/var/lib/registry
EOF
that command fails
FATA[0000] Failed to stat config file -: stat -: no such file or directory
w

wide-garage-9465

08/10/2022, 5:13 AM
Seems like we missed that. Can you please create a GitHub issue?
🙌🏽 1
p

polite-engineer-55788

08/10/2022, 5:14 AM
doing it now 🙂
👍 1
w

wide-garage-9465

08/10/2022, 5:20 AM
Thank you
👍🏽 1
p

polite-engineer-55788

08/14/2022, 2:52 PM
I just sent a PR for this issue fix, lmk if it looks good or needs changes. I was not able to run the test script that I added as it was trying to a pull a image from ghcr.io for which I think I dont have access
c

creamy-pencil-82913

08/15/2022, 8:09 PM
note that you can probably use
/dev/stdin
instead of
-
p

polite-engineer-55788

08/16/2022, 4:20 AM
yeah but
-
is more common IMHO 🙂 .. Do you think the PR is not needed?