Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Pydantic type representing meta Duration

オープン
#2,764 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
api

調査の方向性

Start by reading the Pydantic custom resource support added in release 37 and the existing functions in kubernetes.util.duration. Identify how custom types are serialized and deserialized through model_dump/model_verify and the CustomObjectsApi. Done means a Pydantic type can represent metav1.Duration across that path, with type hints for the duration functions.

索引モデルが issue の本文から書いたものです。

説明

kind/feature

What is the feature and why do you need it:
The Pydantic dependency in 37.0.0 made it possible to define custom models to represent custom resources.

In release 37 a Pydantic model representing custom objects can be defined and via model_dump/model_verify can be passed through the CustomObjectsApi.

A number of these use types not available in the K8s API such a metav1.Duration such as in Velero. This gets serialized to and from openapi spec string to the struct by golang and as such cannot be easily handled via openapi spec.

Before the Pydantic incorporation in 37 there was not a possibility to add in custom models compatible with the Python k8s client parser.

Describe the solution you'd like to see:
A Pydantic meta Duration type that serializes/deserializes such an object.

Typehinting of the kubernetes.util.duration functions.

主要言語
Python
スター
7.7k
フォーク
3.5k
平均マージ
1日 9時間
マージ済み PR(30日)
25

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

kubernetes-client/python のほかの issue

kubernetes-client/python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。