Skip to content

Commit

Permalink
Move ark server & minio to heptio-ark-server ns
Browse files Browse the repository at this point in the history
Move ark server deployment & minio deployment to a separate namespace
from the backups/schedules/restores/config because backups now have a
finalizer. If everything lives in one namespace, you have to delete all
the backups and wait for the GC controller to process them and remove the
finalizer from each before deleting the namespace.

By moving the server into a separate namespace, users can now delete the
heptio-ark namespace the normal way (kubectl delete), and once that
namespace is fully removed, they can delete the heptio-ark-server
namespace.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
  • Loading branch information
ncdc committed Feb 20, 2018
1 parent 46adb6c commit c4278fb
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 42 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,18 @@ For more information, see [the debugging information][18].
### Clean up
Delete any backups you created:
```
kubectl delete -n heptio-ark backup --all
```
Prior to continuing, wait for the following to show no backups:
```
ark backup get
```
To remove the Kubernetes objects for this example from your cluster, run:
```
Expand Down
4 changes: 3 additions & 1 deletion examples/azure/00-ark-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
apiVersion: apps/v1beta1
kind: Deployment
metadata:
namespace: heptio-ark
namespace: heptio-ark-server
name: ark
spec:
replicas: 1
Expand All @@ -32,6 +32,8 @@ spec:
image: gcr.io/heptio-images/ark:latest
command:
- /ark
- --namespace
- heptio-ark
args:
- server
envFrom:
Expand Down
43 changes: 8 additions & 35 deletions examples/common/00-prereqs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,18 @@ kind: Namespace
metadata:
name: heptio-ark

---
apiVersion: v1
kind: Namespace
metadata:
name: heptio-ark-server

---
apiVersion: v1
kind: ServiceAccount
metadata:
name: ark
namespace: heptio-ark
namespace: heptio-ark-server
labels:
component: ark

Expand All @@ -111,42 +117,9 @@ metadata:
component: ark
subjects:
- kind: ServiceAccount
namespace: heptio-ark
namespace: heptio-ark-server
name: ark
roleRef:
kind: ClusterRole
name: cluster-admin
apiGroup: rbac.authorization.k8s.io

---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: Role
metadata:
namespace: heptio-ark
name: ark
labels:
component: ark
rules:
- apiGroups:
- ark.heptio.com
verbs:
- "*"
resources:
- "*"

---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
namespace: heptio-ark
name: ark
labels:
component: ark
subjects:
- kind: ServiceAccount
namespace: heptio-ark
name: ark
roleRef:
kind: Role
name: ark
apiGroup: rbac.authorization.k8s.io
4 changes: 3 additions & 1 deletion examples/common/10-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
apiVersion: apps/v1beta1
kind: Deployment
metadata:
namespace: heptio-ark
namespace: heptio-ark-server
name: ark
spec:
replicas: 1
Expand All @@ -34,6 +34,8 @@ spec:
- /ark
args:
- server
- --namespace
- heptio-ark
volumeMounts:
- name: cloud-credentials
mountPath: /credentials
Expand Down
8 changes: 4 additions & 4 deletions examples/minio/00-minio-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
apiVersion: apps/v1beta1
kind: Deployment
metadata:
namespace: heptio-ark
namespace: heptio-ark-server
name: minio
labels:
component: minio
Expand Down Expand Up @@ -54,7 +54,7 @@ spec:
apiVersion: v1
kind: Service
metadata:
namespace: heptio-ark
namespace: heptio-ark-server
name: minio
labels:
component: minio
Expand All @@ -71,7 +71,7 @@ spec:
apiVersion: v1
kind: Secret
metadata:
namespace: heptio-ark
namespace: heptio-ark-server
name: cloud-credentials
labels:
component: minio
Expand All @@ -85,7 +85,7 @@ stringData:
apiVersion: batch/v1
kind: Job
metadata:
namespace: heptio-ark
namespace: heptio-ark-server
name: minio-setup
labels:
component: minio
Expand Down
2 changes: 1 addition & 1 deletion examples/minio/10-ark-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ backupStorageProvider:
config:
region: minio
s3ForcePathStyle: "true"
s3Url: http://minio.heptio-ark.svc:9000
s3Url: http://minio.heptio-ark-server.svc:9000
backupSyncPeriod: 1m
gcSyncPeriod: 1m
scheduleSyncPeriod: 1m
Expand Down

0 comments on commit c4278fb

Please sign in to comment.