Skip to content

Instantly share code, notes, and snippets.

@gogiel
Created June 28, 2018 19:18
Show Gist options
  • Save gogiel/6f7f76ced5cd9d44616ea8af5d3f4f62 to your computer and use it in GitHub Desktop.
Save gogiel/6f7f76ced5cd9d44616ea8af5d3f4f62 to your computer and use it in GitHub Desktop.
$ kubectl describe job rails-example-app-migration-hxptn
Name: rails-example-app-migration-hxptn
Namespace: default
Selector: controller-uid=3bfd8456-7b07-11e8-b4ff-42010a9c0106
Labels: controller-uid=3bfd8456-7b07-11e8-b4ff-42010a9c0106
job-name=rails-example-app-migration-hxptn
Annotations: <none>
Parallelism: 1
Completions: 1
Start Time: Thu, 28 Jun 2018 21:12:43 +0200
Pods Statuses: 0 Running / 1 Succeeded / 0 Failed
Pod Template:
Labels: controller-uid=3bfd8456-7b07-11e8-b4ff-42010a9c0106
job-name=rails-example-app-migration-hxptn
Containers:
rails:
Image: docker.io/janjedrychowski/rails-example-app-production:v1
Port: <none>
Host Port: <none>
Command:
bin/rake
db:create
db:migrate
Environment:
DB_HOST: <set to the key 'host' in secret 'production-database'> Optional: false
DB_PASSWORD: <set to the key 'password' in secret 'production-database'> Optional: false
Mounts: <none>
Volumes: <none>
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal SuccessfulCreate 1m job-controller Created pod: rails-example-app-migration-hxptn-b74rr
$ kubectl logs rails-example-app-migration-hxptn-b74rr
D, [2018-06-28T19:13:13.870068 #1] DEBUG -- : (1491.5ms) CREATE DATABASE "rails-example-app" ENCODING = 'unicode'
Created database 'rails-example-app'
D, [2018-06-28T19:13:13.932330 #1] DEBUG -- : (10.9ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
D, [2018-06-28T19:13:13.941781 #1] DEBUG -- : (6.8ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
D, [2018-06-28T19:13:13.942768 #1] DEBUG -- : (0.3ms) SELECT pg_try_advisory_lock(5498606728790540085)
D, [2018-06-28T19:13:13.955653 #1] DEBUG -- : (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
I, [2018-06-28T19:13:13.956975 #1] INFO -- : Migrating to CreateEntries (20180610230356)
D, [2018-06-28T19:13:13.959438 #1] DEBUG -- : (0.2ms) BEGIN
== 20180610230356 CreateEntries: migrating ====================================
-- create_table(:entries)
D, [2018-06-28T19:13:13.967483 #1] DEBUG -- : (7.4ms) CREATE TABLE "entries" ("id" bigserial primary key, "nick" character varying, "email" character varying, "content" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
-> 0.0081s
== 20180610230356 CreateEntries: migrated (0.0082s) ===========================
D, [2018-06-28T19:13:13.972236 #1] DEBUG -- : ActiveRecord::SchemaMigration Create (0.7ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180610230356"]]
D, [2018-06-28T19:13:13.973581 #1] DEBUG -- : (1.1ms) COMMIT
D, [2018-06-28T19:13:13.979114 #1] DEBUG -- : ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
D, [2018-06-28T19:13:13.983481 #1] DEBUG -- : (0.2ms) BEGIN
D, [2018-06-28T19:13:13.984708 #1] DEBUG -- : ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "production"], ["created_at", "2018-06-28 19:13:13.983744"], ["updated_at", "2018-06-28 19:13:13.983744"]]
D, [2018-06-28T19:13:13.986122 #1] DEBUG -- : (1.1ms) COMMIT
D, [2018-06-28T19:13:13.986993 #1] DEBUG -- : (0.7ms) SELECT pg_advisory_unlock(5498606728790540085)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment