Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate k8s deployment yaml #9

Open
longfangsong opened this issue Jul 23, 2020 · 0 comments · Fixed by #25
Open

Generate k8s deployment yaml #9

longfangsong opened this issue Jul 23, 2020 · 0 comments · Fixed by #25
Labels
feature request A new feature need to be implemented. medium priority This is not so important for now but will be in the future and we should implement it later. medium This issue is not so easy to fix

Comments

@longfangsong
Copy link
Collaborator

longfangsong commented Jul 23, 2020

eg.

k8s:
  db: "postgres://xxx@shu-student-postgres-svc:5432/shu-student?sslmode=disable"

Should generate:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: shu-student
spec:
  selector:
    matchLabels:
      run: shu-student
  replicas: 1
  template:
    metadata:
      labels:
        run: shu-student
    spec:
      containers:
      - name: shu-student
        image: xxx/shu-student:138153507
        livenessProbe:
          httpGet:
            path: /ping
            port: 8000
          initialDelaySeconds: 5
          periodSeconds: 5
        env:
        - name: DB_ADDRESS
          value: "postgres://xxx@shu-student-postgres-svc:5432/shu-student?sslmode=disable"
        ports:
        - containerPort: 8000
---
apiVersion: v1
kind: Service
metadata:
  name: shu-student-svc
spec:
  selector:
     run: shu-student
  ports:
  - protocol: TCP
    port: 8000
    targetPort: 8000

And if no k8s entry exists, nothing should be generated.

@longfangsong longfangsong added the feature request A new feature need to be implemented. label Jul 23, 2020
@longfangsong longfangsong added this to the Week 1 milestone Jul 27, 2020
zhoudian64 added a commit to zhoudian64/autoAPI that referenced this issue Jul 28, 2020
@longfangsong longfangsong reopened this Sep 6, 2021
@longfangsong longfangsong added medium This issue is not so easy to fix medium priority This is not so important for now but will be in the future and we should implement it later. labels Sep 6, 2021
@longfangsong longfangsong removed this from the Week 1 milestone Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A new feature need to be implemented. medium priority This is not so important for now but will be in the future and we should implement it later. medium This issue is not so easy to fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants