Skip to content

Commit 96d15de

Browse files
committed
added support for secure API server build
1 parent a12f608 commit 96d15de

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

apiserver/DEVELOPMENT.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,9 @@ make docker-image
159159

160160
#### Start Kubernetes Deployment
161161

162-
Note that you should make your KubeRay API server image available by either pushing it to an image registry, such as DockerHub or Quay, or by loading the image into the Kubernetes cluster. If you are using a Kind cluster for development, you can run `make load-image` to load the newly built API server image into the Kind cluster. The operator image will also be needed to be loaded on your cluster. You can use `make operator-image` to build a fresh image from sources, and, if you are using a Kind cluster for development, you can run `make load-operator-image`.
162+
Note that you should make your KubeRay API server image available by either pushing it to an image registry, such as DockerHub or Quay, or by loading the image into the Kubernetes cluster. If you are using a Kind cluster for development, you can run `make load-image` to load the newly built API server image into the Kind cluster. The operator image will also be needed to be loaded on your cluster. If you want run secure API server, you can build security proxy using `make security-proxy-image` and load it to the cluster using `make load-security-proxy-image`
163+
164+
You can use `make operator-image` to build a fresh image from sources, and, if you are using a Kind cluster for development, you can run `make load-operator-image`.
163165

164166
```bash
165167
#Optionally, to load the api server image into the local kind cluster created with make cluster
@@ -168,8 +170,11 @@ make load-image
168170
#To use the helm charts
169171
make deploy
170172
171-
#To use the configuration from deploy/base
173+
#To use the configuration from deploy/base for insecure API server
172174
make install
175+
176+
#To use the configuration from deploy/base for secure API server
177+
make install-secure
173178
```
174179

175180
#### Stop Kubernetes Deployment
@@ -178,8 +183,11 @@ make install
178183
#To use the helm charts
179184
make undeploy
180185
181-
#To use the configuration
186+
#To use the configuration insecure
182187
make uninstall
188+
189+
#To use the configuration secure
190+
make uninstall-secure
183191
```
184192

185193
#### Local Kind Cluster Deployment
@@ -190,7 +198,9 @@ As a convenience for local development the following `make` targets are provided
190198
* `make clean-cluster` -- deletes the local kind cluster created with `make cluster`
191199
* `load-image` -- loads the docker image defined by the `IMG` make variable into the kind cluster. The default value for variable is: `kuberay/apiserver:latest`. The name of the image can be changed by using `make load-image -e IMG=<your image name and tag>`
192200
* `operator-image` -- Build the operator image to be loaded in your kind cluster. The operator image build is `kuberay/operator:latest`. The image tag can be overridden from the command line: ( example: `make operator-image -e OPERATOR_IMAGE_TAG=foo`)
193-
* `load-operator-image` -- Load the operator image to the kind cluster created with `make cluster`. It should be used in conjunction with the `deploy-operator targe`
201+
* `load-operator-image` -- Load the operator image to the kind cluster created with `make cluster`. It should be used in conjunction with the `deploy-operator target`
202+
* `security-proxy-image` -- Build the security proxy image to be loaded in your kind cluster. The security proxy image build is `kuberay/security-proxy:latest`. The image tag can be overridden from the command line: ( example: `make security-proxy-image -e SECURITY_IMAGE_TAG=foo`)
203+
* `load-security-proxy-image` -- Load the security proxy image to the kind cluster created with `make cluster`. It should be used in conjunction with the `install-secure`
194204
* `deploy-operator` -- Deploy operator into your cluster. The tag for the operator image is `kuberay/operator:latest`.
195205
* `undeploy-operator` -- Undeploy operator from your cluster
196206
* `load-ray-test-image` -- Load the ray test images into the cluster.

apiserver/Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ operator-image: ## Build the operator image to be loaded in your kind cluster.
122122

123123
.PHONY: security-proxy-image
124124
security-proxy-image: ## Build the security proxy image to be loaded in your kind cluster.
125-
cd ../experimental && $(MAKE) docker-image -e IMG=kuberay/security-proxy:$(OPERATOR_IMAGE_TAG)
125+
cd ../experimental && $(MAKE) docker-image -e IMG=kuberay/security-proxy:$(SECURITY_IMAGE_TAG)
126126

127127
.PHONY: deploy-operator
128128
deploy-operator: ## Deploy operator via helm into the K8s cluster specified in ~/.kube/config.
@@ -165,21 +165,21 @@ docker-push: ## Push image for the api server.
165165

166166
##@ Deployment
167167
.PHONY: install
168-
install: kustomize docker-image load-image ## Install the kuberay api server to the K8s cluster specified in ~/.kube/config.
168+
install: kustomize docker-image load-image ## Install the kuberay api server without security to the K8s cluster specified in ~/.kube/config.
169169
cd deploy/local/insecure && $(KUSTOMIZE) edit set image kuberay/apiserver=$(IMG)
170170
$(KUSTOMIZE) build deploy/local/insecure | kubectl create -f -
171171

172172
.PHONY: uninstall
173-
uninstall: ## Install the kuberay api server to the K8s cluster specified in ~/.kube/config.
173+
uninstall: ## Remove the kuberay api without security server from the K8s cluster specified in ~/.kube/config.
174174
$(KUSTOMIZE) build deploy/local/insecure | kubectl delete -f -
175175

176176
.PHONY: install-secure
177-
install-secure: kustomize docker-image security-proxy-image load-image load-security-proxy-image ## Install the kuberay api server to the K8s cluster specified in ~/.kube/config.
177+
install-secure: kustomize docker-image security-proxy-image load-image load-security-proxy-image ## Install the kuberay api server with security to the K8s cluster specified in ~/.kube/config.
178178
cd deploy/local/secure && $(KUSTOMIZE) edit set image kuberay/apiserver=$(IMG) && $(KUSTOMIZE) edit set image kuberay/security-proxy=kuberay/security-proxy:latest
179179
$(KUSTOMIZE) build deploy/local/secure | kubectl create -f -
180180

181181
.PHONY: uninstall-secure
182-
uninstall-secure: ## Install the kuberay api server to the K8s cluster specified in ~/.kube/config.
182+
uninstall-secure: ## Remove the kuberay api with security server from the K8s cluster specified in ~/.kube/config.
183183
$(KUSTOMIZE) build deploy/local/secure | kubectl delete -f -
184184

185185
.PHONY: deploy

0 commit comments

Comments
 (0)