-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new overlay for Zuul test instance #1164
Open
YustinaKvr
wants to merge
6
commits into
main
Choose a base branch
from
overlay_zuul
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
8a3b354
Add new overlay for Zuul test instance
ptichoid 65487c0
fix image name
ptichoid ba649fc
fix builder image name
ptichoid 4bf2009
Update zuul.conf.hcl
YustinaKvr 4dfecfa
change cert
ptichoid 3539a18
Merge branch 'overlay_zuul' of github.com:opentelekomcloud-infra/syst…
ptichoid File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
kubernetes/zuul/overlays/zuul_ci_test/configs/kube.config.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: v1 | ||
kind: Config | ||
current-context: otcci | ||
preferences: {} | ||
|
||
clusters: | ||
- name: otcci | ||
cluster: | ||
server: "https://192.168.21.182:5443" | ||
insecure-skip-tls-verify: true | ||
|
||
contexts: | ||
- name: otcci | ||
context: | ||
cluster: otcci | ||
user: otcci-admin | ||
|
||
users: | ||
- name: otcci-admin | ||
user: | ||
{{- with secret "secret/kubernetes/otcci_k8s" }} | ||
client-certificate-data: "{{ base64Encode .Data.data.client_crt }}" | ||
client-key-data: "{{ base64Encode .Data.data.client_key }}" | ||
{{- end }} |
52 changes: 52 additions & 0 deletions
52
kubernetes/zuul/overlays/zuul_ci_test/configs/openstack/clouds.yaml.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
# Nodepool openstacksdk configuration | ||
# | ||
# This file is deployed to nodepool launcher and builder hosts | ||
# and is used there to authenticate nodepool operations to clouds. | ||
# This file only contains projects we are launching test nodes in, and | ||
# the naming should correspond that used in nodepool configuration | ||
# files. | ||
# | ||
# Generated automatically, please do not edit directly! | ||
cache: | ||
expiration: | ||
server: 5 | ||
port: 5 | ||
floating-ip: 5 | ||
clouds: | ||
otcci-pool1: | ||
auth: | ||
{{- with secret "secret/clouds/otcci_nodepool_pool1" }} | ||
{{- with secret (printf "secret/%s" .Data.data.user_secret_name) }} | ||
auth_url: "{{ .Data.data.auth_url }}" | ||
user_domain_name: "{{ .Data.data.user_domain_name }}" | ||
username: "{{ .Data.data.username }}" | ||
password: "{{ .Data.data.password }}" | ||
{{- end }} | ||
project_name: "{{ .Data.data.project_name }}" | ||
{{- end }} | ||
private: true | ||
otcci-pool2: | ||
auth: | ||
{{- with secret "secret/clouds/otcci_nodepool_pool2" }} | ||
{{- with secret (printf "secret/%s" .Data.data.user_secret_name) }} | ||
auth_url: "{{ .Data.data.auth_url }}" | ||
user_domain_name: "{{ .Data.data.user_domain_name }}" | ||
username: "{{ .Data.data.username }}" | ||
password: "{{ .Data.data.password }}" | ||
{{- end }} | ||
project_name: "{{ .Data.data.project_name }}" | ||
{{- end }} | ||
private: true | ||
otcci-pool3: | ||
auth: | ||
{{- with secret "secret/clouds/otcci_nodepool_pool3" }} | ||
{{- with secret (printf "secret/%s" .Data.data.user_secret_name) }} | ||
auth_url: "{{ .Data.data.auth_url }}" | ||
user_domain_name: "{{ .Data.data.user_domain_name }}" | ||
username: "{{ .Data.data.username }}" | ||
password: "{{ .Data.data.password }}" | ||
{{- end }} | ||
project_name: "{{ .Data.data.project_name }}" | ||
{{- end }} | ||
private: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
zuul_base_vault_token_path: /var/run/zuul/trusted-ro/zuul-base-vault-token | ||
zuul_vault_addr: https://vault-lb.eco.tsi-dev.otc-service.com:8200 |
31 changes: 31 additions & 0 deletions
31
kubernetes/zuul/overlays/zuul_ci_test/configs/vault-agent/config-nodepool.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
pid_file = "/home/vault/.pid" | ||
"auto_auth" = { | ||
"method" = { | ||
"mount_path" = "auth/kubernetes_otcci" | ||
"config" = { | ||
"role" = "zuul" | ||
} | ||
"type" = "kubernetes" | ||
} | ||
sink "file" { | ||
config = { | ||
path = "/home/vault/.token" | ||
} | ||
} | ||
} | ||
|
||
cache { | ||
use_auto_auth_token = true | ||
} | ||
|
||
template { | ||
destination = "/vault/secrets/openstack/clouds.yaml" | ||
source = "/vault/custom/clouds.yaml.hcl" | ||
perms = "0640" | ||
} | ||
|
||
template { | ||
destination = "/vault/secrets/.kube/config" | ||
source = "/vault/custom/kube.config.hcl" | ||
perms = "0640" | ||
} |
55 changes: 55 additions & 0 deletions
55
kubernetes/zuul/overlays/zuul_ci_test/configs/vault-agent/config-zuul.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
pid_file = "/home/vault/.pid" | ||
"auto_auth" = { | ||
"method" = { | ||
"mount_path" = "auth/kubernetes_otcci" | ||
"config" = { | ||
"role" = "zuul" | ||
} | ||
"type" = "kubernetes" | ||
} | ||
sink "file" { | ||
config = { | ||
path = "/home/vault/.token" | ||
} | ||
} | ||
} | ||
|
||
cache { | ||
use_auto_auth_token = true | ||
} | ||
|
||
template { | ||
destination = "/vault/secrets/connections/github.key" | ||
contents = <<EOT | ||
{{- with secret "secret/zuul/connections/github" }}{{ .Data.data.app_key }}{{ end }} | ||
EOT | ||
perms = "0600" | ||
} | ||
template { | ||
destination = "/vault/secrets/connections/gitlab.key" | ||
contents = <<EOT | ||
{{ with secret "secret/zuul/connections/gitlab" }}{{ .Data.data.ssh_key }}{{ end }} | ||
EOT | ||
perms = "0600" | ||
} | ||
template { | ||
destination = "/vault/secrets/connections/gitea.key" | ||
contents = <<EOT | ||
{{ with secret "secret/zuul/connections/gitea" }}{{ .Data.data.ssh_key }}{{ end }} | ||
EOT | ||
perms = "0600" | ||
} | ||
|
||
template { | ||
destination = "/vault/secrets/zuul.conf" | ||
source = "/vault/custom/zuul.conf.hcl" | ||
perms = "0644" | ||
# exec = { command = "sh -c '{ if [ -f /secrets/config.check ]; then kubectl -n zuul-ci-test rollout restart statefulset zuul-executor; else touch /secrets/config.check; fi }'", timeout = "30s" } | ||
} | ||
template { | ||
destination = "/vault/secrets/sshkey" | ||
contents = <<EOT | ||
{{- with secret "secret/zuul/sshkey" }}{{ .Data.data.private_key }}{{ end }} | ||
EOT | ||
perms = "0600" | ||
} |
29 changes: 29 additions & 0 deletions
29
kubernetes/zuul/overlays/zuul_ci_test/configs/vault-agent/executor-base-vault-agent.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
pid_file = "/home/vault/.pid" | ||
|
||
"auto_auth" = { | ||
"method" = { | ||
"mount_path" = "auth/kubernetes_otcci" | ||
"config" = { | ||
# Here we explicitly request zuul-base role which gives access to | ||
# only certain policies | ||
"role" = "zuul-base" | ||
} | ||
"type" = "kubernetes" | ||
} | ||
sink "file" { | ||
config = { | ||
# Write token into the file zuul executor reads | ||
path = "/var/run/zuul/trusted-ro/zuul-base-vault-token" | ||
} | ||
} | ||
} | ||
|
||
cache { | ||
use_auto_auth_token = true | ||
} | ||
|
||
# Vault agent requires at least one template or listener is present. Add a socket | ||
listener "unix" { | ||
address = "/home/vault/vault_agent.socket" | ||
tls_disable = true | ||
} |
109 changes: 109 additions & 0 deletions
109
kubernetes/zuul/overlays/zuul_ci_test/configs/zuul.conf.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
[zookeeper] | ||
hosts=zookeeper.zuul-ci-test.svc.cluster.local:2281 | ||
tls_cert=/tls/client/tls.crt | ||
tls_key=/tls/client/tls.key | ||
tls_ca=/tls/client/ca.crt | ||
session_timeout=40 | ||
|
||
[scheduler] | ||
#tenant_config=/etc/zuul-config/zuul/main.yaml | ||
tenant_config_script=/etc/zuul-config/tools/render_config.py | ||
state_dir=/var/lib/zuul | ||
relative_priority=true | ||
prometheus_port=9091 | ||
|
||
[web] | ||
listen_address=0.0.0.0 | ||
port=9000 | ||
status_url=https://zuul-test.otc-service.com | ||
root=https://zuul-test.otc-service.com | ||
prometheus_port=9091 | ||
|
||
[fingergw] | ||
port=9079 | ||
user=zuul | ||
|
||
[keystore] | ||
{{- with secret "secret/zuul/keystore_password" }} | ||
password={{ .Data.data.password }} | ||
{{- end }} | ||
|
||
[merger] | ||
git_dir=/var/lib/zuul/git | ||
git_timeout=600 | ||
[email protected] | ||
git_user_name=OpenTelekomCloud Zuul | ||
prometheus_port=9091 | ||
|
||
[executor] | ||
manage_ansible=true | ||
ansible_root=/var/lib/zuul/managed_ansible | ||
private_key_file=/etc/zuul/sshkey | ||
disk_limit_per_job=2000 | ||
max_starting_builds=5 | ||
trusted_ro_paths=/var/run/zuul/trusted-ro | ||
variables=/var/run/zuul/vars/site-vars.yaml | ||
prometheus_port=9091 | ||
|
||
[database] | ||
{{- with secret "database/static-creds/zuul-static" }} | ||
dburi=postgresql://{{ .Data.username }}:{{ .Data.password }}@192.168.21.196:5432/zuul?sslmode=require | ||
{{- end }} | ||
|
||
[connection "github"] | ||
name=github | ||
driver=github | ||
{{- with secret "secret/zuul/connections/github" }} | ||
webhook_token={{ .Data.data.webhook_token }} | ||
app_id={{ .Data.data.app_id }} | ||
{{- end }} | ||
app_key=/etc/zuul/connections/github.key | ||
|
||
[connection "gitlab"] | ||
name=gitlab | ||
driver=gitlab | ||
canonical_hostname=gitlab | ||
cloneurl=ssh://[email protected] | ||
server=git.tsi-dev.otc-service.com | ||
{{- with secret "secret/zuul/connections/gitlab" }} | ||
api_token={{ .Data.data.api_token }} | ||
webhook_token={{ .Data.data.webhook_token }} | ||
{{- end }} | ||
sshkey=/etc/zuul/connections/gitlab.key | ||
|
||
[connection "opendev"] | ||
name=opendev | ||
driver=git | ||
baseurl=https://opendev.org | ||
|
||
[connection "gitea"] | ||
name=gitea | ||
driver=gitea | ||
baseurl=https://gitea.eco.tsi-dev.otc-service.com | ||
server=gitea.eco.tsi-dev.otc-service.com | ||
cloneurl=ssh://[email protected]:2222 | ||
{{- with secret "secret/zuul/connections/gitea" }} | ||
api_token={{ .Data.data.api_token }} | ||
webhook_secret={{ .Data.data.webhook_secret }} | ||
{{- end }} | ||
sshkey=/etc/zuul/connections/gitea.key | ||
|
||
[connection "smtp"] | ||
name=smtp | ||
driver=smtp | ||
server=otc-de-out.mms.t-systems-service.com | ||
port=25 | ||
[email protected] | ||
[email protected] | ||
{{- with secret "secret/smtp_gw" }} | ||
user={{ .Data.data.username }} | ||
password={{ .Data.data.password }} | ||
{{- end }} | ||
use_starttls=True | ||
|
||
[auth "keycloak"] | ||
default=True | ||
driver=OpenIDConnect | ||
realm=eco | ||
issuer_id=https://keycloak.eco.tsi-dev.otc-service.com/realms/eco | ||
client_id=zuul |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
apiVersion: "rbac.authorization.k8s.io/v1" | ||
kind: "ClusterRoleBinding" | ||
metadata: | ||
name: "zuul-vault-crb" | ||
roleRef: | ||
apiGroup: "rbac.authorization.k8s.io" | ||
kind: "ClusterRole" | ||
name: "system:auth-delegator" | ||
subjects: | ||
- kind: "ServiceAccount" | ||
name: "zuul" | ||
namespace: "zuul-ci-test" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
apiVersion: "rbac.authorization.k8s.io/v1" | ||
kind: "ClusterRoleBinding" | ||
metadata: | ||
name: "zuul-admin-crb" | ||
roleRef: | ||
kind: "ClusterRole" | ||
name: "cluster-admin" | ||
apiGroup: "" | ||
subjects: | ||
- kind: "ServiceAccount" | ||
name: "zuul" | ||
namespace: "zuul-ci-test" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zuul-static-test