Skip to content

Instantly share code, notes, and snippets.

@IvanBiv
Last active June 2, 2018 06:48
Show Gist options
  • Save IvanBiv/9a89024f5cd4a1207070badd025bf57c to your computer and use it in GitHub Desktop.
Save IvanBiv/9a89024f5cd4a1207070badd025bf57c to your computer and use it in GitHub Desktop.
Bad with deploy Gitlab: kubectl describe pod gitlab1-gitlab-75576c4589-7dvlm
# kubectl describe pod gitlab1-gitlab-75576c4589-7dvlm
Name: gitlab1-gitlab-75576c4589-7dvlm
Namespace: default
Node: k8s-m2.me/192.168.88.12
Start Time: Sat, 02 Jun 2018 00:42:16 +0300
Labels: app=gitlab1-gitlab
name=gitlab1-gitlab
pod-template-hash=3113270145
Annotations: <none>
Status: Running
IP: 10.233.105.52
Controlled By: ReplicaSet/gitlab1-gitlab-75576c4589
Containers:
gitlab:
Container ID: docker://d65bc531375b7b27c3f5c70f1ade9d3d5ca4c945d9ad7311ab95eb1836ae7cad
Image: gitlab/gitlab-ce:10.6.2-ce.0
Image ID: docker-pullable://gitlab/gitlab-ce@sha256:573e1cf90a5bf1bd9b964d782dd22394b73d67ccdf7f47e0d3152feb112ac00d
Ports: 8105/TCP, 8065/TCP, 8005/TCP, 22/TCP, 9090/TCP
Host Ports: 0/TCP, 0/TCP, 0/TCP, 0/TCP, 0/TCP
Command:
/bin/bash
-c
sed -i "s/environment ({'GITLAB_ROOT_PASSWORD' => initial_root_password }) if initial_root_password/environment ({'GITLAB_ROOT_PASSWORD' => initial_root_password, 'GITLAB_SHARED_RUNNERS_REGISTRATION_TOKEN' => node['gitlab']['gitlab-rails']['initial_shared_runners_registration_token'] })/g" /opt/gitlab/embedded/cookbooks/gitlab/recipes/database_migrations.rb && exec /assets/wrapper
State: Waiting
Reason: CrashLoopBackOff
Last State: Terminated
Reason: Completed
Exit Code: 0
Started: Sat, 02 Jun 2018 09:38:42 +0300
Finished: Sat, 02 Jun 2018 09:42:08 +0300
Ready: False
Restart Count: 92
Liveness: http-get http://:8005/health_check%3Ftoken=SXBAQichEJasbtDSygrD delay=180s timeout=15s period=10s #success=1 #failure=3
Readiness: http-get http://:8005/health_check%3Ftoken=SXBAQichEJasbtDSygrD delay=15s timeout=1s period=10s #success=1 #failure=3
Environment:
GITLAB_EXTERNAL_SCHEME: <set to the key 'external_scheme' of config map 'gitlab1-gitlab-config'> Optional: false
GITLAB_EXTERNAL_HOSTNAME: <set to the key 'external_hostname' of config map 'gitlab1-gitlab-config'> Optional: false
GITLAB_REGISTRY_EXTERNAL_SCHEME: <set to the key 'registry_external_scheme' of config map 'gitlab1-gitlab-config'> Optional: false
GITLAB_REGISTRY_EXTERNAL_HOSTNAME: <set to the key 'registry_external_hostname' of config map 'gitlab1-gitlab-config'> Optional: false
GITLAB_MATTERMOST_EXTERNAL_SCHEME: <set to the key 'mattermost_external_scheme' of config map 'gitlab1-gitlab-config'> Optional: false
GITLAB_MATTERMOST_EXTERNAL_HOSTNAME: <set to the key 'mattermost_external_hostname' of config map 'gitlab1-gitlab-config'> Optional: false
POSTGRES_USER: <set to the key 'postgres_user' of config map 'gitlab1-gitlab-config'> Optional: false
POSTGRES_PASSWORD: <set to the key 'postgres_password' in secret 'gitlab1-gitlab-secrets'> Optional: false
POSTGRES_DB: <set to the key 'postgres_db' of config map 'gitlab1-gitlab-config'> Optional: false
GITLAB_INITIAL_SHARED_RUNNERS_REGISTRATION_TOKEN: <set to the key 'initial_shared_runners_registration_token' in secret 'gitlab1-gitlab-secrets'> Optional: false
MATTERMOST_APP_UID: <set to the key 'mattermost_app_uid' of config map 'gitlab1-gitlab-config'> Optional: false
MATTERMOST_APP_SECRET: <set to the key 'mattermost_app_secret' in secret 'gitlab1-gitlab-secrets'> Optional: false
GITLAB_OMNIBUS_CONFIG: external_url "#{ENV['GITLAB_EXTERNAL_SCHEME']}://#{ENV['GITLAB_EXTERNAL_HOSTNAME']}"
registry_external_url "#{ENV['GITLAB_REGISTRY_EXTERNAL_SCHEME']}://#{ENV['GITLAB_REGISTRY_EXTERNAL_HOSTNAME']}"
mattermost_external_url "#{ENV['GITLAB_MATTERMOST_EXTERNAL_SCHEME']}://#{ENV['GITLAB_MATTERMOST_EXTERNAL_HOSTNAME']}"
gitlab_rails['initial_shared_runners_registration_token'] = ENV['GITLAB_INITIAL_SHARED_RUNNERS_REGISTRATION_TOKEN']
nginx['enable'] = false
registry_nginx['enable'] = false
mattermost_nginx['enable'] = false
gitlab_workhorse['listen_network'] = 'tcp'
gitlab_workhorse['listen_addr'] = '0.0.0.0:8005'
mattermost['service_address'] = '0.0.0.0'
mattermost['service_port'] = '8065'
registry['registry_http_addr'] = '0.0.0.0:8105'
postgresql['enable'] = false
gitlab_rails['db_host'] = 'gitlab1-gitlab-postgresql'
gitlab_rails['db_password'] = ENV['POSTGRES_PASSWORD']
gitlab_rails['db_username'] = ENV['POSTGRES_USER']
gitlab_rails['db_database'] = ENV['POSTGRES_DB']
redis['enable'] = false
gitlab_rails['redis_host'] = 'gitlab1-gitlab-redis'
mattermost['file_directory'] = '/gitlab-data/mattermost';
mattermost['sql_driver_name'] = 'postgres';
mattermost['sql_data_source'] = "user=#{ENV['POSTGRES_USER']} host=gitlab1-gitlab-postgresql port=5432 dbname=mattermost_production password=#{ENV['POSTGRES_PASSWORD']} sslmode=disable";
mattermost['gitlab_enable'] = true;
mattermost['gitlab_secret'] = ENV['MATTERMOST_APP_SECRET'];
mattermost['gitlab_id'] = ENV['MATTERMOST_APP_UID'];
mattermost['gitlab_scope'] = '';
mattermost['gitlab_auth_endpoint'] = "#{ENV['GITLAB_EXTERNAL_SCHEME']}://#{ENV['GITLAB_EXTERNAL_HOSTNAME']}/oauth/authorize";
mattermost['gitlab_token_endpoint'] = "#{ENV['GITLAB_EXTERNAL_SCHEME']}://#{ENV['GITLAB_EXTERNAL_HOSTNAME']}/oauth/token";
mattermost['gitlab_user_api_endpoint'] = "#{ENV['GITLAB_EXTERNAL_SCHEME']}://#{ENV['GITLAB_EXTERNAL_HOSTNAME']}/api/v4/user"
manage_accounts['enable'] = true
manage_storage_directories['manage_etc'] = false
if ENV['PAGES_EXTERNAL_SCHEME'] && ENV['PAGES_EXTERNAL_DOMAIN']
pages_external_url "#{ENV['PAGES_EXTERNAL_SCHEME']}://#{ENV['PAGES_EXTERNAL_DOMAIN']}/"
gitlab_pages['enable'] = true
gitlab_pages['listen_proxy'] = "0.0.0.0:8090"
end
gitlab_shell['auth_file'] = '/gitlab-data/ssh/authorized_keys'
git_data_dirs({ "default" => { "path" => "/gitlab-data/git-data" } })
gitlab_rails['shared_path'] = '/gitlab-data/shared'
gitlab_rails['uploads_directory'] = '/gitlab-data/uploads'
gitlab_ci['builds_directory'] = '/gitlab-data/builds'
gitlab_rails['registry_path'] = '/gitlab-registry'
gitlab_rails['trusted_proxies'] = ["10.0.0.0/8","172.16.0.0/12","192.168.0.0/16"]
prometheus['listen_address'] = '0.0.0.0:9090'
postgres_exporter['enable'] = true
postgres_exporter['env'] = {
'DATA_SOURCE_NAME' => "user=#{ENV['POSTGRES_USER']} host=gitlab1-gitlab-postgresql port=5432 dbname=#{ENV['POSTGRES_DB']} password=#{ENV['POSTGRES_PASSWORD']} sslmode=disable"
}
redis_exporter['enable'] = true
redis_exporter['flags'] = {
'redis.addr' => "gitlab1-gitlab-redis:6379",
}
GITLAB_POST_RECONFIGURE_CODE: include Gitlab::CurrentSettings
Doorkeeper::Application.where(uid: ENV["MATTERMOST_APP_UID"]).first_or_create(
name: "GitLab Mattermost",
secret: ENV["MATTERMOST_APP_SECRET"],
redirect_uri: "#{ENV["GITLAB_MATTERMOST_EXTERNAL_SCHEME"]}://#{ENV["GITLAB_MATTERMOST_EXTERNAL_HOSTNAME"]}/signup/gitlab/complete\r\n#{ENV["GITLAB_MATTERMOST_EXTERNAL_SCHEME"]}://#{ENV["GITLAB_MATTERMOST_EXTERNAL_HOSTNAME"]}/login/gitlab/complete")
PrometheusService.where(template: true).first_or_create(
active: true, api_url: "http://localhost:9090")
KubernetesService.where(template: true).first_or_create(
active: true,
api_url: "https://#{ENV["KUBERNETES_SERVICE_HOST"]}:#{ENV["KUBERNETES_SERVICE_PORT"]}",
token: File.read("/var/run/secrets/kubernetes.io/serviceaccount/token"),
ca_pem: File.read("/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"))
Gitlab::CurrentSettings.current_application_settings.update_attribute(:health_check_access_token, 'SXBAQichEJasbtDSygrD')
GITLAB_POST_RECONFIGURE_SCRIPT: /opt/gitlab/bin/gitlab-rails runner -e production "$GITLAB_POST_RECONFIGURE_CODE"
Mounts:
/etc/gitlab from config (rw)
/gitlab-data from data (rw)
/gitlab-registry from registry (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-vbpxh (ro)
Conditions:
Type Status
Initialized True
Ready False
PodScheduled True
Volumes:
data:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: gitlab1-gitlab-storage
ReadOnly: false
registry:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: gitlab1-gitlab-registry-storage
ReadOnly: false
config:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: gitlab1-gitlab-config-storage
ReadOnly: false
default-token-vbpxh:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-vbpxh
Optional: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: <none>
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Pulled 58m (x84 over 9h) kubelet, k8s-m2.me Container image "gitlab/gitlab-ce:10.6.2-ce.0" already present on machine
Warning Unhealthy 9m (x1709 over 9h) kubelet, k8s-m2.me Readiness probe failed: Get http://10.233.105.52:8005/health_check?token=SXBAQichEJasbtDSygrD: dial tcp 10.233.105.52:8005: getsockopt: connection refused
Warning BackOff 4m (x1064 over 8h) kubelet, k8s-m2.me Back-off restarting failed container
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment