You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Complete documentation coverage of registry operator (#46)
* Add more commands in README
Signed-off-by: Philippe Martin <[email protected]>
* Remove definition of NAMESPACE when executing make run, which seems not used
Signed-off-by: Philippe Martin <[email protected]>
* Update CONTRIBUTING
Signed-off-by: Philippe Martin <[email protected]>
* Document DevfileRegistry resource
Signed-off-by: Philippe Martin <[email protected]>
* Update REGISTRIES_LISTS
Signed-off-by: Philippe Martin <[email protected]>
* Fix typo "ociRegistryImage" instead of registryVolumeSize and secretName
Signed-off-by: Philippe Martin <[email protected]>
* No doc about Storage
Signed-off-by: Philippe Martin <[email protected]>
* Update CONTRIBUTING
Signed-off-by: Philippe Martin <[email protected]>
---------
Signed-off-by: Philippe Martin <[email protected]>
Copy file name to clipboardExpand all lines: DEVFILE_REGISTRY.md
+146-3Lines changed: 146 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,14 @@ The Devfile Registry custom resource allows you to create and manage your own in
4
4
5
5
## Deploying a Devfile Registry
6
6
7
-
Once the Devfile Registry operator has been deployed to a cluster, it's straightforward to deploy a Devfile Registry. The following samples below showcase how the registry can be deployed on to an OpenShift or Kubernetes cluster.
7
+
Once the Devfile Registry operator has been deployed to a cluster, you can deploy a Devfile Registry by creating custom resources. The following samples below showcase how the registry can be deployed on to an OpenShift or Kubernetes cluster.
8
8
9
9
In addition to the examples below, the `samples/` folder in this repo provides some example devfile registry yaml files for convenience.
10
10
11
11
12
12
### OpenShift
13
13
14
-
Installing the devfile registry via the devfile registry operator on an OpenShift cluster can be done in one easy command:
14
+
Installing the devfile registry via the devfile registry operator on an OpenShift cluster can be done with this command:
15
15
16
16
```bash
17
17
$ cat <<EOF | oc apply -f -
@@ -30,7 +30,7 @@ EOF
30
30
31
31
### Kubernetes
32
32
33
-
Installing the devfile registry on a Kubernetes cluster is similar, but requires setting the `k8s.ingressDomain` field first.
33
+
Installing the devfile registry on a Kubernetes cluster is similar, but requires setting the `k8s.ingressDomain` field.
34
34
35
35
```bash
36
36
$ export INGRESS_DOMAIN=<my-ingress-domain>
@@ -61,3 +61,146 @@ If you want to send telemetry information to your own Segment instance, specify
61
61
key: <your-segment-write-key>
62
62
registryViewerWriteKey: <your-segment-write-key>
63
63
```
64
+
65
+
## Using Specific Container Images
66
+
67
+
By default, the operator deploys a Devfile Registry using a Pod containing three containers:
68
+
69
+
-`devfile-registry` container runs the API serving the Devfile stacks. The container image used by default
70
+
is `quay.io/devfile/devfile-index:next` and you can change it with the field `spec.devfileIndex.image`.
71
+
-`oci-registry` container runs a standard OCI registry, serving the stacks in the OCI format.
72
+
The container image used by default is `quay.io/devfile/oci-registry:next` and you can change it with the field `spec.ociRegistry.image`.
73
+
-`registry-viewer` container runs a web frontend, to help the user brwose the Devfile stacks.
74
+
The container image used by default is `quay.io/devfile/registry-viewer:next` and you can change it with the field `spec.registryViewer.image`.
75
+
76
+
```bash
77
+
$ cat <<EOF | oc apply -f -
78
+
apiVersion: registry.devfile.io/v1alpha1
79
+
kind: DevfileRegistry
80
+
metadata:
81
+
name: my-devfile-registry
82
+
spec:
83
+
devfileIndex:
84
+
image: quay.io/my-devfile/devfile-index:next
85
+
ociRegistry:
86
+
image: quay.io/my-devfile/oci-registry:next
87
+
registryViewer:
88
+
image: quay.io/my-devfile/registry-viewer:next
89
+
EOF
90
+
```
91
+
92
+
### Defining the ImagePullPolicy for pulling containers
93
+
94
+
By default, the containers will be pulled depending on the policy set on the Kubernetes or OpenShift cluster the registry is deployed on.
95
+
96
+
You can set a specific pull policy for each container, by setting the fields `spec.devfileIndex.imagePullPolicy`, `spec.ociRegistry.imagePullPolicy` and `spec.registryViewer.imagePullPolicy` to a value `IfNotPresent`, `Always` or `Never`. See the [Kubernetes documentation](https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy) for more information.
97
+
98
+
99
+
```bash
100
+
$ cat <<EOF | oc apply -f -
101
+
apiVersion: registry.devfile.io/v1alpha1
102
+
kind: DevfileRegistry
103
+
metadata:
104
+
name: my-devfile-registry
105
+
spec:
106
+
devfileIndex:
107
+
image: quay.io/my-devfile/devfile-index:next
108
+
imagePullPolicy: Always
109
+
ociRegistry:
110
+
image: quay.io/my-devfile/oci-registry:next
111
+
imagePullPolicy: Always
112
+
registryViewer:
113
+
image: quay.io/my-devfile/registry-viewer:next
114
+
imagePullPolicy: Always
115
+
EOF
116
+
```
117
+
118
+
## Disabling the web frontend
119
+
120
+
You can ask the operator to deploy the Devfile Registry without the `registry-viewer` container, by setting the field `spec.headless` to `true`.
121
+
122
+
```bash
123
+
$ cat <<EOF | oc apply -f -
124
+
apiVersion: registry.devfile.io/v1alpha1
125
+
kind: DevfileRegistry
126
+
metadata:
127
+
name: headless-devfile-registry
128
+
spec:
129
+
devfileIndex:
130
+
image: quay.io/devfile/devfile-index:next
131
+
telemetry:
132
+
registryName: test
133
+
headless: true
134
+
EOF
135
+
```
136
+
137
+
## Configuring TLS for Ingress/Route resource
138
+
139
+
The operator creates a Route resource (on OpenShift) or an Ingress resources (on Kubernetes)
140
+
to give access to the Web frontend.
141
+
142
+
By default, the Ingress or Route is secured by TLS.
143
+
144
+
You can ask the operator to disable the use of TLS by setting the field `spec.tls.enabled` to false.
145
+
146
+
```bash
147
+
$ cat <<EOF | kubectl apply -f -
148
+
apiVersion: registry.devfile.io/v1alpha1
149
+
kind: DevfileRegistry
150
+
metadata:
151
+
name: devfile-registry
152
+
spec:
153
+
devfileIndex:
154
+
image: quay.io/devfile/devfile-index:next
155
+
telemetry:
156
+
registryName: test
157
+
tls:
158
+
enabled: false
159
+
EOF
160
+
```
161
+
162
+
You can ask the operator to configure the TLS with a specific certificate, by specifying a secret
163
+
containing the certificate and the associated private key using the field `spec.tls.secretName`:
Copy file name to clipboardExpand all lines: REGISTRIES_LISTS.md
+36-2Lines changed: 36 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
# Registries Lists
2
2
3
-
The Cluster/Devfile Registries Lists allow admins to specify multiple devfile registries to expose devfiles from various sources for use within the cluster or namespace. In order to be added to the list, the devfile registries must be reachable and support the Devfile v2.0 spec and above.
3
+
The Devfile Registries Lists allow admins to specify multiple devfile registries to expose devfiles from various sources for use within the cluster or namespace. In order to be added to the list, the devfile registries must be reachable and support the Devfile v2.0 spec and above.
4
4
5
5
>**ClusterDevfileRegistriesList** is a custom resource where cluster admins can add a list of devfile registries to allow devfiles to be visible at the cluster level.
6
6
7
7
8
8
> **DevfileRegistriesList** is a custom resource where cluster admins can add a list of devfile registries to allow devfiles to be visible at the namespace level. Registries in this list will take precedence over the ones in the ClusterDevfileRegistriesList if there is a conflict.
9
9
10
-
## Deploying a Cluster or Devfile Registries List
10
+
## Deploying a Cluster or Namespaced Devfile Registries List
11
11
12
12
Note the following limitations when deploying a new list type:
13
13
* Only one ClusterDevfileRegistriesList can be installed per cluster. If there is an existing list, you will encounter a validation error.
@@ -49,7 +49,41 @@ spec:
49
49
EOF
50
50
```
51
51
52
+
#### Skipping the TLS Verification
52
53
54
+
The operator contacts each Devfile Registry of the list, to check its validity.
55
+
56
+
In a non-production environment, you may want the operator to Skip the TLS Verification during this call, by setting the field `skipTLSVerify` for the Devfile Registry:
57
+
58
+
```bash
59
+
$ cat <<EOF | kubectl apply -f -
60
+
apiVersion: registry.devfile.io/v1alpha1
61
+
kind: ClusterDevfileRegistriesList
62
+
metadata:
63
+
name: cluster-list
64
+
spec:
65
+
devfileRegistries:
66
+
- name: devfile-staging
67
+
url: 'https://registry.stage.devfile.io'
68
+
skipTLSVerify: true
69
+
EOF
70
+
```
71
+
72
+
or
73
+
74
+
```bash
75
+
$ cat <<EOF | kubectl apply -f -
76
+
apiVersion: registry.devfile.io/v1alpha1
77
+
kind: DevfileRegistriesList
78
+
metadata:
79
+
name: namespace-list
80
+
spec:
81
+
devfileRegistries:
82
+
- name: devfile-staging
83
+
url: 'https://registry.stage.devfile.io'
84
+
skipTLSVerify: true
85
+
EOF
86
+
```
53
87
54
88
## Updating the Cluster or Devfile Registries List
0 commit comments