Skip to content

Commit

Permalink
fix: use the docker image from docker hub in the k8s manifests (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
ovaistariq committed Mar 26, 2022
1 parent a58c232 commit 2ed1b6c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 23 deletions.
2 changes: 1 addition & 1 deletion deployment/manifests/base/deployment.yaml
Expand Up @@ -31,7 +31,7 @@ spec:
spec:
containers:
- name: tigrisdb-server
image: tigrisdb:latest # To be replaced with the image URI during kustomization phase
image: tigrisdata/tigrisdb:alpha # Replace this with the version you want to run through kustomization
imagePullPolicy: Always
command: ["/server/service"]
volumeMounts:
Expand Down
2 changes: 1 addition & 1 deletion deployment/manifests/overlays/sample/deployment.yaml
Expand Up @@ -25,4 +25,4 @@ spec:
volumes:
- name: fdb-cluster-config-volume
configMap:
name: dev-fdb-cluster-config
name: sample-fdb-cluster-config
4 changes: 0 additions & 4 deletions deployment/manifests/overlays/sample/kustomization.yaml
Expand Up @@ -18,7 +18,3 @@ resources:
- ../../base
patchesStrategicMerge:
- deployment.yaml
images:
- name: tigrisdb
newName: prod/tigrisdb
newTag: v1
30 changes: 13 additions & 17 deletions docs/deploy_k8s.md
Expand Up @@ -10,46 +10,42 @@ The default manifests are defined in the `deployment/manifests/base`
directory.

Before these can be applied they need to be kustomized by passing in the
container image URI, relevant server configuration and the FoundationDB cluster
config map.
FoundationDB cluster config map.

Included is an overlay `deployment/manifests/overlays/sample` that shows how the
base manifest can be kustomized.

### Passing custom server configuration

Through the use of Kustomize configmap generator, custom configuration can be
generated and passed to the server container.
The `deployment/manifests/base` directory has an example to show how custom
configuration file can be generated and made available to the container.
generated and passed to the server container. The `deployment/manifests/base`
directory has an example to show how custom configuration file can be generated
and made available to the container.

This is achieved by defining the `configMapGenerator` in kustomization file
This is achieved by defining the `configMapGenerator` in kustomization file
which references the server configuration file `server.yaml`:

```yaml
configMapGenerator:
- name: tigrisdb-server-config
files:
- server.yaml
```

The deployment configuration then mounts the configmap as a volume and makes
it available to the server.
The deployment configuration then mounts the configmap as a volume and makes it
available to the server.

### FoundationDB cluster configuration file

The FoundationDB cluster created through [fdb-kubernetes-operator](https://github.com/FoundationDB/fdb-kubernetes-operator)
exposes the cluster configuration through a configmap. The configmap is named
`<cluster_name>-config`. The configmap is mounted as a volume
`fdb-cluster-config-volume` and the configuration can then be accessed by the
The FoundationDB cluster created
through [fdb-kubernetes-operator](https://github.com/FoundationDB/fdb-kubernetes-operator)
exposes the cluster configuration through a configmap. The configmap is named
`<cluster_name>-config`. The configmap is mounted as a volume named
`fdb-cluster-config-volume` and the configuration can then be accessed by the
server container to be able to connect to FoundationDB.

Take a look at the `overlays/sample` manifests to see how this is done.

### Container image

The deployment manifest contains a placeholder for the image, and it must be
replaced before applying the manifest too Kubernetes.

### Applying the manifest

```shell
Expand Down

0 comments on commit 2ed1b6c

Please sign in to comment.