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

Tekton を試す #48

Closed
suzuki-shunsuke opened this issue May 16, 2020 · 5 comments
Closed

Tekton を試す #48

suzuki-shunsuke opened this issue May 16, 2020 · 5 comments

Comments

@suzuki-shunsuke
Copy link
Owner

suzuki-shunsuke commented May 16, 2020

https://tekton.dev/docs/getting-started/

$ kubectl apply --filename https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml

PV が必要らしい

https://minikube.sigs.k8s.io/docs/handbook/persistent_volumes/

(⎈ |minikube:default)❯ kubectl get pv
No resources found in default namespace.

(⎈ |minikube:default)❯ kubectl get storageclasses
NAME                 PROVISIONER                RECLAIMPOLICY   VOLUMEBINDINGMODE   ALLOWVOLUMEEXPANSION   AGE
standard (default)   k8s.io/minikube-hostpath   Delete          Immediate           false                  6m33s

pv.yaml

apiVersion: v1
kind: PersistentVolume
metadata:
  name: pv0001
spec:
  accessModes:
    - ReadWriteOnce
  capacity:
    storage: 5Gi
  hostPath:
    path: /data/pv0001/
$ kubectl apply -f pv.yaml
$ kubectl get pv
NAME     CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS      CLAIM   STORAGECLASS   REASON   AGE
pv0001   5Gi        RWO            Retain           Available                                   7m20s
$ brew tap tektoncd/tools
$ brew install tektoncd/tools/tektoncd-cli

Dashboard のインストール

$ kubectl apply --filename https://github.com/tektoncd/dashboard/releases/latest/download/tekton-dashboard-release.yaml
@suzuki-shunsuke
Copy link
Owner Author

Dashboard の認証はまだなさそう: tektoncd/dashboard#692

@suzuki-shunsuke
Copy link
Owner Author

suzuki-shunsuke commented May 16, 2020

ログや task の実行履歴とかの永続化はサポートしているのか?

ログを Elasticsearch に永続化はできるらしい

https://tekton.dev/docs/pipelines/logs/

You can setup an external service to consume and display logs, for example Elasticsearch, Beats and Kibana

とはいえ、多分これだと、 pod 消すと Web UI や CLI だとログが確認できなくなる気がする

@suzuki-shunsuke
Copy link
Owner Author

https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#clean-up-finished-jobs-automatically

Clean Up Finished Jobs Automatically
Finished Jobs are usually no longer needed in the system.
Keeping them around in the system will put pressure on the API server.
If the Jobs are managed directly by a higher level controller, such as CronJobs, the Jobs can be cleaned up by CronJobs based on the specified capacity-based cleanup policy.

Job の話だが、残り続けると API server を圧迫する

@suzuki-shunsuke
Copy link
Owner Author

suzuki-shunsuke commented May 16, 2020

定期的に pod (taskrun) を消す。すると履歴が確認できなくなる気がするが、諦める(割り切る)のがいいのか?

@suzuki-shunsuke
Copy link
Owner Author

どのくらい保持できるものなのか。当然全体の task の種類や、個々の taskrun が実行されるペースによって変わるが、

  • 1週間
  • 1ヶ月

という期間を保持できるものなのか?
1ヶ月以上前の履歴を見れなくてほんとに大丈夫か

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant