Skip to content

Commit

Permalink
Gitlab custom sa (#93)
Browse files Browse the repository at this point in the history
* Enable parametrized project name for GitLab

* remove nominative names from params

* add additional check to avoid certificates being overwrited

* Use an scpecific release from cluster-lifecycle

* remove the incorrect new line

* Redirect GitLab non SSL traffic to SSL
  • Loading branch information
makentenza authored and oybed committed Jun 13, 2018
1 parent f6ccbd8 commit f7560ce
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
1 change: 1 addition & 0 deletions gitlab-ce/files/params/gitlab-params
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ ETC_VOL_SIZE=100Mi
GITLAB_DATA_VOL_SIZE=5Gi
POSTGRESQL_VOL_SIZE=5Gi
GITLAB_ROOT_PASSWORD=secretpassword
NAMESPACE=gitlab
2 changes: 2 additions & 0 deletions gitlab-ce/files/projectrequests/gitlab
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NAMESPACE=gitlab
NAMESPACE_DISPLAY_NAME="GitLab CE SCM Project"
8 changes: 0 additions & 8 deletions gitlab-ce/files/projects/projects.yml

This file was deleted.

8 changes: 5 additions & 3 deletions gitlab-ce/files/templates/gitlab-ssl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ objects:
command:
- bash
- -c
- /opt/gitlab/embedded/bin/openssl req -newkey rsa:2048 -nodes -keyout /etc/gitlab/${APPLICATION_HOSTNAME}.key -x509 -days 365 -out /etc/gitlab/${APPLICATION_HOSTNAME}.crt -subj "/C=GB/ST=London/L=London/O=Container and PaaS CoP/CN=${APPLICATION_HOSTNAME}"
- test -e "/etc/gitlab/${APPLICATION_HOSTNAME}.crt" && { echo "Custom SSL certificates already present"; exit 0; }; /opt/gitlab/embedded/bin/openssl req -newkey rsa:2048 -nodes -keyout /etc/gitlab/${APPLICATION_HOSTNAME}.key -x509 -days 365 -out /etc/gitlab/${APPLICATION_HOSTNAME}.crt -subj "/C=GB/ST=London/L=London/O=Container and PaaS CoP/CN=${APPLICATION_HOSTNAME}"
volumes:
- gitlab-ce-volume-1
triggers:
Expand Down Expand Up @@ -440,6 +440,7 @@ objects:
targetPort: 443-https
tls:
termination: passthrough
insecureEdgeTerminationPolicy: Redirect
wildcardPolicy: None
parameters:
- description: A label that will be seen by the user at login
Expand Down Expand Up @@ -537,6 +538,7 @@ parameters:
name: REDIS_VOL_SIZE
value: 512Mi
- name: NAMESPACE
description: Namespace where Gitlab will be deployed.
displayName: Namespace
displayName: Namespace name where Gitlab CE will be deployed
description: Namespace name where Gitlab CE will be deployed
value: gitlab
required: true
4 changes: 3 additions & 1 deletion gitlab-ce/inventory/group_vars/seed-hosts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ openshift_cluster_content:
- object: projectrequest
content:
- name: gitlab-project
file: "{{ inventory_dir }}/../files/projects/projects.yml"
template: "https://raw.githubusercontent.com/redhat-cop/cluster-lifecycle/v3.9.0/files/projectrequest/template.yml"
template_action: create
params: "{{ inventory_dir }}/../files/projectrequests/gitlab"
- object: deployments
content:
- name: gitlab
Expand Down

0 comments on commit f7560ce

Please sign in to comment.