From fb5793cd0eae85be20385a57bbfbce05d5a71789 Mon Sep 17 00:00:00 2001 From: Ryoko Tominaga Date: Fri, 5 Jun 2020 08:01:46 +0900 Subject: [PATCH 1/5] ja: Make docs/concepts/overview/working-with-objects/labels.md follow v1.17 of the original text --- .../overview/working-with-objects/labels.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/content/ja/docs/concepts/overview/working-with-objects/labels.md b/content/ja/docs/concepts/overview/working-with-objects/labels.md index ec6f9f7201..33e30771b0 100644 --- a/content/ja/docs/concepts/overview/working-with-objects/labels.md +++ b/content/ja/docs/concepts/overview/working-with-objects/labels.md @@ -59,6 +59,26 @@ _ラベル(Labels)_ はPodなどのオブジェクトに割り当てられたキ 正しいラベル値は63文字以下の長さで、空文字か、もしくは開始と終了が英数字(`[a-z0-9A-Z]`)で、文字列の間がダッシュ(`-`)、アンダースコア(`_`)、ドット(`.`)と英数字である文字列を使うことができます。 +例えば、`environment: production`と`app: nginx`の2つのラベルを持つPodのconfigファイルは下記のようになります。 + +```yaml + +apiVersion: v1 +kind: Pod +metadata: + name: label-demo + labels: + environment: production + app: nginx +spec: + containers: + - name: nginx + image: nginx:1.14.2 + ports: + - containerPort: 80 + +``` + ## ラベルセレクター {#label-selectors} [名前とUID](/docs/user-guide/identifiers)とは異なり、ラベルはユニーク性を提供しません。通常、多くのオブジェクトが同じラベルを保持することを想定します。 From 0342000e728d681601cafdb71b0902b184259766 Mon Sep 17 00:00:00 2001 From: Ryoko Tominaga Date: Fri, 5 Jun 2020 08:13:44 +0900 Subject: [PATCH 2/5] add caution to 'Label selectors' section --- .../ja/docs/concepts/overview/working-with-objects/labels.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/content/ja/docs/concepts/overview/working-with-objects/labels.md b/content/ja/docs/concepts/overview/working-with-objects/labels.md index 33e30771b0..5926e3b9e3 100644 --- a/content/ja/docs/concepts/overview/working-with-objects/labels.md +++ b/content/ja/docs/concepts/overview/working-with-objects/labels.md @@ -97,6 +97,10 @@ Kubernetes APIは現在2タイプのセレクターをサポートしていま ReplicaSetなど、いくつかのAPIタイプにおいて、2つのインスタンスのラベルセレクターは単一の名前空間において重複してはいけません。重複していると、コントローラがそれらのラベルセレクターがコンフリクトした操作とみなし、どれだけの数のレプリカを稼働させるべきか決めることができなくなります。 {{< /note >}} +{{< caution >}} +等価ベース、集合ベースともに、論理OR (`||`) オペレーターは存在しません。フィルターステートメントが構造化されていることを適宜確認してください。 +{{< /caution >}} + ### *等価ベース(Equality-based)* の要件(requirement) *等価ベース(Equality-based)* もしくは*不等ベース(Inequality-based)* の要件は、ラベルキーとラベル値によるフィルタリングを可能にします。 From 46d998658cbe67da238b22317689b63451f18a55 Mon Sep 17 00:00:00 2001 From: Ryoko Tominaga Date: Fri, 5 Jun 2020 10:47:11 +0900 Subject: [PATCH 3/5] change url to japanese page --- .../ja/docs/concepts/overview/working-with-objects/labels.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/ja/docs/concepts/overview/working-with-objects/labels.md b/content/ja/docs/concepts/overview/working-with-objects/labels.md index 5926e3b9e3..255d039041 100644 --- a/content/ja/docs/concepts/overview/working-with-objects/labels.md +++ b/content/ja/docs/concepts/overview/working-with-objects/labels.md @@ -198,7 +198,7 @@ kubectl get pods -l 'environment,environment notin (frontend)' ``` ### APIオブジェクトに参照を設定する -[`Service`](/docs/user-guide/services) と [`ReplicationController`](/docs/user-guide/replication-controller)のような、いくつかのKubernetesオブジェクトでは、ラベルセレクターを[Pod](/docs/user-guide/pods)のような他のリソースのセットを指定するのにも使われます。 +[`Service`](/ja/docs/user-guide/services) と [`ReplicationController`](/docs/user-guide/replication-controller)のような、いくつかのKubernetesオブジェクトでは、ラベルセレクターを[Pod](/docs/user-guide/pods)のような他のリソースのセットを指定するのにも使われます。 #### ServiceとReplicationController `Service`が対象とするPodの集合は、ラベルセレクターによって定義されます。 From e8fd2ebad471bc8fd31376e099de4860eb3d86da Mon Sep 17 00:00:00 2001 From: Ryoko Tominaga Date: Fri, 5 Jun 2020 17:07:51 +0900 Subject: [PATCH 4/5] fix wording --- .../ja/docs/concepts/overview/working-with-objects/labels.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/ja/docs/concepts/overview/working-with-objects/labels.md b/content/ja/docs/concepts/overview/working-with-objects/labels.md index 255d039041..b1160d440c 100644 --- a/content/ja/docs/concepts/overview/working-with-objects/labels.md +++ b/content/ja/docs/concepts/overview/working-with-objects/labels.md @@ -59,7 +59,7 @@ _ラベル(Labels)_ はPodなどのオブジェクトに割り当てられたキ 正しいラベル値は63文字以下の長さで、空文字か、もしくは開始と終了が英数字(`[a-z0-9A-Z]`)で、文字列の間がダッシュ(`-`)、アンダースコア(`_`)、ドット(`.`)と英数字である文字列を使うことができます。 -例えば、`environment: production`と`app: nginx`の2つのラベルを持つPodのconfigファイルは下記のようになります。 +例えば、`environment: production`と`app: nginx`の2つのラベルを持つPodの設定ファイルは下記のようになります。 ```yaml @@ -98,7 +98,7 @@ ReplicaSetなど、いくつかのAPIタイプにおいて、2つのインスタ {{< /note >}} {{< caution >}} -等価ベース、集合ベースともに、論理OR (`||`) オペレーターは存在しません。フィルターステートメントが構造化されていることを適宜確認してください。 +等価ベース、集合ベースともに、論理OR (`||`) オペレーターは存在しません。フィルターステートメントが意図した通りになっていることを確認してください。 {{< /caution >}} ### *等価ベース(Equality-based)* の要件(requirement) From bee08c56f2cac9b785f5a2b8c1522ef8d74eb17c Mon Sep 17 00:00:00 2001 From: Ryoko Tominaga Date: Fri, 5 Jun 2020 17:09:36 +0900 Subject: [PATCH 5/5] fix URLs --- .../ja/docs/concepts/overview/working-with-objects/labels.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/ja/docs/concepts/overview/working-with-objects/labels.md b/content/ja/docs/concepts/overview/working-with-objects/labels.md index b1160d440c..3a5cf6f7eb 100644 --- a/content/ja/docs/concepts/overview/working-with-objects/labels.md +++ b/content/ja/docs/concepts/overview/working-with-objects/labels.md @@ -198,7 +198,7 @@ kubectl get pods -l 'environment,environment notin (frontend)' ``` ### APIオブジェクトに参照を設定する -[`Service`](/ja/docs/user-guide/services) と [`ReplicationController`](/docs/user-guide/replication-controller)のような、いくつかのKubernetesオブジェクトでは、ラベルセレクターを[Pod](/docs/user-guide/pods)のような他のリソースのセットを指定するのにも使われます。 +[`Service`](/ja/docs/concepts/services-networking/service/) と [`ReplicationController`](/docs/concepts/workloads/controllers/replicationcontroller/)のような、いくつかのKubernetesオブジェクトでは、ラベルセレクターを[Pod](/ja/docs/concepts/workloads/pods/pod/)のような他のリソースのセットを指定するのにも使われます。 #### ServiceとReplicationController `Service`が対象とするPodの集合は、ラベルセレクターによって定義されます。