Skip to content
This repository was archived by the owner on Mar 26, 2021. It is now read-only.

Commit 07155bb

Browse files
authored
Merge pull request #234 from perotinus/statusandca
Two updates to the cluster API: adding a condition to the status, and modifying the AuthInfo
2 parents 1f3ae83 + ef32beb commit 07155bb

File tree

71 files changed

+18524
-4025
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+18524
-4025
lines changed

cluster-registry-crd.yaml

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,10 @@ spec:
2121
properties:
2222
authInfo:
2323
properties:
24-
providers:
25-
items:
26-
properties:
27-
config:
28-
type: object
29-
name:
30-
type: string
31-
type:
32-
properties:
33-
name:
34-
type: string
35-
type: object
36-
type: object
37-
type: array
24+
controllerAuthInfo:
25+
type: object
26+
userAuthInfo:
27+
type: object
3828
type: object
3929
kubernetesApiEndpoints:
4030
properties:
@@ -54,6 +44,26 @@ spec:
5444
type: object
5545
type: object
5646
status:
47+
properties:
48+
conditions:
49+
items:
50+
properties:
51+
lastHeartbeatTime:
52+
format: date-time
53+
type: string
54+
lastTransitionTime:
55+
format: date-time
56+
type: string
57+
message:
58+
type: string
59+
reason:
60+
type: string
61+
status:
62+
type: string
63+
type:
64+
type: string
65+
type: object
66+
type: array
5767
type: object
5868
type: object
5969
version: v1alpha1

docs/development.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ You must install [kubebuilder](https://github.com/kubernetes-sigs/kubebuilder)
1515
in order to work in this repository. `kubebuilder` is in active development, and
1616
we expect that the structure of this repository will need to change as
1717
`kubebuilder` is improved. All of the commands below are verified to work with
18-
`kubebuilder` `0.1.7`.
18+
`kubebuilder` `0.1.9`.
1919

2020
## Run all tests
2121

2222
To set up the testing environment, run:
2323

2424
```
25-
$ kubebuilder update vendor
25+
$ kubebuilder update vendor --overwrite-dep-manifest
2626
$ KUBEBUILDER_PATH=<path_to_your_kubebuilder_install>
2727
$ export TEST_ASSET_ETCD=$KUBEBUILDER_PATH/bin/etcd
2828
$ export TEST_ASSET_KUBE_APISERVER=$KUBEBUILDER_PATH/bin/kube-apiserver
@@ -49,8 +49,12 @@ To update generated code after modifying the cluster type, run these commands
4949
from the repo root:
5050

5151
```
52+
$ kubebuilder update vendor --overwrite-dep-manifest
5253
$ kubebuilder generate
53-
$ kubebuilder docs --cleanup=false
54+
$ kubebuilder docs # This will fail because of missing dependencies.
55+
$ dep ensure
56+
$ kubebuilder docs
57+
$ chown -R $USER docs/reference/build # The generated docs are owned by root.
5458
$ kubebuilder create config --crds --output cluster-registry-crd.yaml
5559
```
5660

@@ -59,9 +63,7 @@ OpenAPI spec in `docs/reference/openapi-spec`, and update the CRD YAML
5963
definition in the repo root.
6064

6165
After running the commands, edit `cluster-registry-crd.yaml` to remove the
62-
`status` field, the `creationTimestamp` and `labels` from the `metadata`, and
63-
the `additionalProperties` field (as in
64-
https://github.com/kubernetes/cluster-registry/pull/231).
66+
`status` field, and the `creationTimestamp` and `labels` from the `metadata`.
6567

6668
## Verify Go source files
6769

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
# <strong>clusterregistry</strong>
2+
# <strong>Clusterregistry</strong>
33

44
------------
55

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
# <strong>Definitions</strong>
2+
# <strong>Field Definitions</strong>
33

44
------------
55

docs/reference/build/documents/_generated_apigroup_v1_meta_definition.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

docs/reference/build/documents/_generated_apiresource_v1_meta_definition.md

Lines changed: 0 additions & 29 deletions
This file was deleted.
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
1-
## AuthInfo v1alpha1 clusterregistry
1+
## AuthInfo v1alpha1
22

33
Group | Version | Kind
44
------------ | ---------- | -----------
5-
clusterregistry | v1alpha1 | AuthInfo
5+
`clusterregistry` | `v1alpha1` | `AuthInfo`
66

77

88

9-
AuthInfo holds public information that describes how a client can get credentials to access the cluster. For example, OAuth2 client registration endpoints and supported flows, or Kerberos servers locations.
10-
11-
It should not hold any private or sensitive information.
9+
AuthInfo holds information that describes how a client can get credentials to access the cluster. For example, OAuth2 client registration endpoints and supported flows, or Kerberos server locations.
1210

1311
<aside class="notice">
1412
Appears In:
1513

1614
<ul>
17-
<li><a href="#clusterspec-v1alpha1-clusterregistry">ClusterSpec clusterregistry/v1alpha1</a></li>
15+
<li><a href="#clusterspec-v1alpha1">ClusterSpec v1alpha1</a></li>
1816
</ul></aside>
1917

2018
Field | Description
2119
------------ | -----------
22-
providers <br /> *[AuthProviderConfig](#authproviderconfig-v1alpha1-clusterregistry) array* | AuthProviders is a list of configurations for auth providers.
20+
`controllerAuthInfo`<br /> *[ObjectReference](#objectreference-v1)* | ControllerAuthInfo references an object that contains implementation-specific details about how a controller should authenticate. A simple use case for this would be to reference a secret in another namespace that stores a bearer token that can be used to authenticate against this cluster&#39;s API server.
21+
`userAuthInfo`<br /> *[ObjectReference](#objectreference-v1)* | UserAuthInfo references an object that contains implementation-specific details about how a user should authenticate against this cluster.
2322

docs/reference/build/documents/_generated_authproviderconfig_v1alpha1_clusterregistry_definition.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

docs/reference/build/documents/_generated_authprovidertype_v1alpha1_clusterregistry_definition.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

docs/reference/build/documents/_generated_cluster_v1alpha1_clusterregistry_concept.md

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11

22

33
-----------
4-
# Cluster v1alpha1 clusterregistry
4+
# Cluster v1alpha1
55

66

77

88
Group | Version | Kind
99
------------ | ---------- | -----------
10-
clusterregistry | v1alpha1 | Cluster
10+
`clusterregistry` | `v1alpha1` | `Cluster`
1111

1212

1313

@@ -17,58 +17,43 @@ clusterregistry | v1alpha1 | Cluster
1717

1818
Cluster contains information about a cluster in a cluster registry.
1919

20-
<aside class="notice">
21-
Appears In:
2220

23-
<ul>
24-
<li><a href="#clusterlist-v1alpha1-clusterregistry">ClusterList clusterregistry/v1alpha1</a></li>
25-
</ul> </aside>
2621

2722
Field | Description
2823
------------ | -----------
29-
apiVersion <br /> *string* | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources
30-
kind <br /> *string* | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
31-
metadata <br /> *[ObjectMeta](#objectmeta-v1-meta)* | Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
32-
spec <br /> *[ClusterSpec](#clusterspec-v1alpha1-clusterregistry)* | Spec is the specification of the cluster. This may or may not be reconciled by an active controller.
33-
status <br /> *[ClusterStatus](#clusterstatus-v1alpha1-clusterregistry)* | Status is the status of the cluster.
24+
`apiVersion`<br /> *string* | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources
25+
`kind`<br /> *string* | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
26+
`metadata`<br /> *[ObjectMeta](#objectmeta-v1)* | Standard object&#39;s metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
27+
`spec`<br /> *[ClusterSpec](#clusterspec-v1alpha1)* | Spec is the specification of the cluster. This may or may not be reconciled by an active controller.
28+
`status`<br /> *[ClusterStatus](#clusterstatus-v1alpha1)* | Status is the status of the cluster.
3429

3530

36-
### ClusterSpec v1alpha1 clusterregistry
31+
### ClusterSpec v1alpha1
3732

3833
<aside class="notice">
3934
Appears In:
4035

4136
<ul>
42-
<li><a href="#cluster-v1alpha1-clusterregistry">Cluster clusterregistry/v1alpha1</a></li>
37+
<li><a href="#cluster-v1alpha1">Cluster v1alpha1</a></li>
4338
</ul></aside>
4439

4540
Field | Description
4641
------------ | -----------
47-
authInfo <br /> *[AuthInfo](#authinfo-v1alpha1-clusterregistry)* | AuthInfo contains public information that can be used to authenticate to and authorize with this cluster. It is not meant to store private information (e.g., tokens or client certificates) and cluster registry implementations are not expected to provide hardened storage for secrets.
48-
kubernetesApiEndpoints <br /> *[KubernetesAPIEndpoints](#kubernetesapiendpoints-v1alpha1-clusterregistry)* | KubernetesAPIEndpoints represents the endpoints of the API server for this cluster.
42+
`authInfo`<br /> *[AuthInfo](#authinfo-v1alpha1)* | AuthInfo contains public information that can be used to authenticate to and authorize with this cluster. It is not meant to store private information (e.g., tokens or client certificates) and cluster registry implementations are not expected to provide hardened storage for secrets.
43+
`kubernetesApiEndpoints`<br /> *[KubernetesAPIEndpoints](#kubernetesapiendpoints-v1alpha1)* | KubernetesAPIEndpoints represents the endpoints of the API server for this cluster.
4944

50-
### ClusterStatus v1alpha1 clusterregistry
45+
### ClusterStatus v1alpha1
5146

5247
<aside class="notice">
5348
Appears In:
5449

5550
<ul>
56-
<li><a href="#cluster-v1alpha1-clusterregistry">Cluster clusterregistry/v1alpha1</a></li>
51+
<li><a href="#cluster-v1alpha1">Cluster v1alpha1</a></li>
5752
</ul></aside>
5853

5954
Field | Description
6055
------------ | -----------
61-
62-
### ClusterList v1alpha1 clusterregistry
63-
64-
65-
66-
Field | Description
67-
------------ | -----------
68-
apiVersion <br /> *string* | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources
69-
items <br /> *[Cluster](#cluster-v1alpha1-clusterregistry) array* |
70-
kind <br /> *string* | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
71-
metadata <br /> *[ListMeta](#listmeta-v1-meta)* |
56+
`conditions`<br /> *[ClusterCondition](#clustercondition-v1alpha1) array* | Conditions contains the different condition statuses for this cluster.
7257

7358

7459

0 commit comments

Comments
 (0)