devstar-devcontainer-operator/config/samples/devcontainer_v1_devcontainerapp.yaml
戴明辰 c10befe9f8 !1 可通过 YAML 创建 CRD DevcontainerApp (StatefulSet + NodePort_Service)
* 优化 DevcontainerApp Reconciler 逻辑
* Added Readiness Probing
* Updated port num validation
* Updated Quickstart Doc
* Replaced Nginx Ingress Controller with NodePort Service
* Updated resource creation:
* Added resource creation
* Added .editorconfig
2024-09-25 01:51:11 +00:00

36 lines
1.6 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

apiVersion: devcontainer.devstar.cn/v1
kind: DevcontainerApp
metadata:
name: daimingchen-devstar-beef092a69c011ef9c00000c2952a362
namespace: devstar-studio-ns
labels:
app.kubernetes.io/name: devstar-devcontainer-kubebuilder-scaffold
app.kubernetes.io/managed-by: kustomize
spec:
statefulset:
image: mcr.microsoft.com/devcontainers/base:dev-ubuntu-20.04
command:
- /bin/bash
- -c
- echo 'root:root' | chpasswd && useradd -m -s /bin/bash username && echo 'username:password' | chpasswd && usermod -aG sudo username && apt-get update && apt-get install -y openssh-server && service ssh start && apt-get clean && tail -f /dev/null
containerPort: 22
service:
servicePort: 22
# nodePort: 30000 # 建议动态分配,不建议写入固定 NodePort 值
######################################################################################################################################
# 后记SSH连接方式
# ```bash
# >>>>> minikube ip
# # 192.168.49.2
#
# >>>>> minikube service list
# # |-------------------------|----------------------------------------------------------|--------------|---------------------------|
# # | NAMESPACE | NAME | TARGET PORT | URL |
# # |-------------------------|----------------------------------------------------------|--------------|---------------------------|
# # | devstar-devcontainer-ns | daimingchen-devstar-beef092a69c011ef9c00000c2952a362-svc | ssh-port/22 | http://192.168.49.2:32598 |
#
# >>>>> ssh -p 32598 username@192.168.49.2