Move ark server & minio to heptio-ark-server ns

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>
This commit is contained in:
Andy Goldstein
2018-02-20 09:41:17 -05:00
parent 46adb6c6aa
commit 08d4fc8b88
10 changed files with 53 additions and 49 deletions

View File

@@ -16,7 +16,7 @@
apiVersion: apps/v1beta1
kind: Deployment
metadata:
namespace: heptio-ark
namespace: heptio-ark-server
name: ark
spec:
replicas: 1
@@ -32,6 +32,8 @@ spec:
image: gcr.io/heptio-images/ark:latest
command:
- /ark
- --namespace
- heptio-ark
args:
- server
envFrom:

View File

@@ -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
@@ -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

View File

@@ -16,7 +16,7 @@
apiVersion: apps/v1beta1
kind: Deployment
metadata:
namespace: heptio-ark
namespace: heptio-ark-server
name: ark
spec:
replicas: 1
@@ -34,6 +34,8 @@ spec:
- /ark
args:
- server
- --namespace
- heptio-ark
volumeMounts:
- name: cloud-credentials
mountPath: /credentials

View File

@@ -16,7 +16,7 @@
apiVersion: apps/v1beta1
kind: Deployment
metadata:
namespace: heptio-ark
namespace: heptio-ark-server
name: minio
labels:
component: minio
@@ -54,7 +54,7 @@ spec:
apiVersion: v1
kind: Service
metadata:
namespace: heptio-ark
namespace: heptio-ark-server
name: minio
labels:
component: minio
@@ -71,7 +71,7 @@ spec:
apiVersion: v1
kind: Secret
metadata:
namespace: heptio-ark
namespace: heptio-ark-server
name: cloud-credentials
labels:
component: minio
@@ -85,7 +85,7 @@ stringData:
apiVersion: batch/v1
kind: Job
metadata:
namespace: heptio-ark
namespace: heptio-ark-server
name: minio-setup
labels:
component: minio

View File

@@ -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