An error occurred while fetching the assigned milestone of the selected merge_request.
Automatically configure Kubernetes Service
This change makes to read in-cluster credentials and put them into Kubernetes Service template, allowing to fulfill story described here: https://gitlab.com/gitlab-org/gitlab-ce/issues/28888. This in order to work, requires GitLab 9.1.
Merge request reports
Activity
mentioned in commit f0f07c3f
@ayufan Not sure if this is real or not, but this isn't working in my helm chart version. I copied verbatim. The KubernetesService isn't being created. When I run from the rails console, the command generates an object, but doesn't seem to save it. I'm really not sure why, since
first_or_create
is what all the other entries use, and it works fine to save the object. And there's no errors to indicate why it wouldn't be saving.irb(main):004:0> KubernetesService.where(template: true).first_or_create( irb(main):005:1* active: true, irb(main):006:1* api_url: "https://#{ENV["KUBERNETES_SERVICE_HOST"]}:#{ENV["KUBERNETES_SERVICE_PORT"]}", irb(main):007:1* token: File.read("/var/run/secrets/kubernetes.io/serviceaccount/token"), irb(main):008:1* ca_pem: File.read("/var/run/secrets/kubernetes.io/serviceaccount/ca.crt")) => #<KubernetesService id: nil, type: "KubernetesService", title: nil, project_id: nil, created_at: nil, updated_at: nil, active: true, properties: {"api_url"=>"https://10.3.240.1:443", "token"=>"redacted", "ca_pem"=>"-----BEGIN CERTIFICATE-----\nredacted\n-----END CERTIFICATE-----\n"}, template: true, push_events: true, issues_events: true, merge_requests_events: true, tag_push_events: true, note_events: true, build_events: true, category: "deployment", default: false, wiki_page_events: true, pipeline_events: true, confidential_issues_events: true, commit_events: true> irb(main):009:0> KubernetesService.first => nil
Please register or sign in to reply