Skip to content

Commit

Permalink
gitlab first
Browse files Browse the repository at this point in the history
  • Loading branch information
Administrator committed Feb 3, 2017
1 parent 4ce48d9 commit 53c3fd7
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
kargo
kubectl
gitlab/ci/kuectl
gitlab/ci/.git
2 changes: 2 additions & 0 deletions registry/htpasswd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
root:$2y$05$wSD6amVPgRN4/dhdWTXuue0NV.folVC90gZs/7tAWBn7/mVoDaDdO

58 changes: 58 additions & 0 deletions registry/registry-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
apiVersion: v1
kind: ReplicationController
metadata:
name: registry-v0
namespace: kube-system
labels:
k8s-app: registry
version: v0
# kubernetes.io/cluster-service: "true"
spec:
replicas: 1
selector:
k8s-app: registry
version: v0
template:
metadata:
labels:
k8s-app: registry
version: v0
# kubernetes.io/cluster-service: "true"
spec:
containers:
- name: registry
image: docker.io/registry:2
resources:
# keep request = limit to keep this container in guaranteed class
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 100m
memory: 100Mi
env:
- name: REGISTRY_HTTP_ADDR
value: :5000
- name: REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY
value: /var/lib/registry
#- name: REGISTRY_AUTH_HTPASSWD_REALM
#value: basic_realm
#- name: REGISTRY_AUTH_HTPASSWD_PATH
#value: /auth/htpasswd
volumeMounts:
- name: image-store
mountPath: /var/lib/registry
#- name: auth-dir
#mountPath: /auth
ports:
- containerPort: 5000
name: registry
protocol: TCP
volumes:
- name: image-store
emptyDir: {}
#hostPath:
#path:/srv/kube-registry
#- name: auth-dir
#secret:
#secretName: registry-auth-secret
18 changes: 18 additions & 0 deletions registry/registry-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: v1
kind: Service
metadata:
name: registry
namespace: kube-system
labels:
k8s-app: registry
kubernetes.io/cluster-service: "true"
kubernetes.io/name: "Registry"
spec:
type: NodePort
selector:
k8s-app: registry
ports:
- name: registry
port: 5000
nodePort: 30550
protocol: TCP
16 changes: 16 additions & 0 deletions traefik/gitlab-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: gitlab
namespace: gitlab
annotations:
kubernetes.io/ingress.class: "traefik"
spec:
rules:
- host: gitlab.satoshi.tech
http:
paths:
- backend:
serviceName: gitlab
servicePort: 80
7 changes: 6 additions & 1 deletion traefik/kube-system-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,9 @@ spec:
- backend:
serviceName: traefik-console
servicePort: 8080

- host: registry.satoshi.tech
http:
paths:
- backend:
serviceName: registry
servicePort: 5000

0 comments on commit 53c3fd7

Please sign in to comment.