Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #29 from poblin-orange/develop
Browse files Browse the repository at this point in the history
fix token-config-content for k3s-agent
  • Loading branch information
poblin-orange authored Jan 16, 2021
2 parents 7cb58ef + 21170d8 commit a8d4627
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .final_builds/jobs/k3s-agent/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ builds:
version: 8983b337bc586123de5a47ac712a7aa23b8dc4d89a687889d3932b680d1b0381
blobstore_id: 1151d4a3-75cf-4a88-7741-88f453fa9dc6
sha1: sha256:5f2de8465476707159dbd115ada9bf7f81ceeaf9cfe29601d7d3d85f17a6e565
a4d175996786ee5d1f915411a05765fa4174895bb3b00d077c60488b42119595:
version: a4d175996786ee5d1f915411a05765fa4174895bb3b00d077c60488b42119595
blobstore_id: aa65b3bb-66f7-45b7-678e-497b2857704a
sha1: sha256:3f6e549c4989d7febabb3287aa9bdf54a9b9a32679129a9b34e0ee47d2bf5719
c17a8adc1a8f595743f58228497c767a8bf5faab71e184c7a48c45bbeac1a843:
version: c17a8adc1a8f595743f58228497c767a8bf5faab71e184c7a48c45bbeac1a843
blobstore_id: 6d5c4e0a-e31a-49a8-5037-96aa51036a49
Expand Down
4 changes: 4 additions & 0 deletions .final_builds/jobs/k3s-server/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ builds:
version: 3ac37bb6d183cbe54221590838324785fc40f95182254acbf03ef4a6c7cef37e
blobstore_id: e9de980f-5d77-45a9-5a89-e4cb79562737
sha1: sha256:6a821829144cd2ae18b63a696168e94da17701a4590fa0a89fa5c66f3f73867c
4a63251d56d91b2e03518ab4362f9835f4583b5e808ef02007b8afbc45877a87:
version: 4a63251d56d91b2e03518ab4362f9835f4583b5e808ef02007b8afbc45877a87
blobstore_id: 09dbc733-d3df-489e-4849-860943406d72
sha1: sha256:2a7eec90a8cb8fffab550d7c08b143f9a55559ad1cc90dd2f01ca2f4c8c33dba
4dd0b4c15a58fceae095811a02039cab981e346dab1771cc20bc7b18bdc994fc:
version: 4dd0b4c15a58fceae095811a02039cab981e346dab1771cc20bc7b18bdc994fc
blobstore_id: 5d065403-e29c-428f-7728-a03e13bffc31
Expand Down
5 changes: 4 additions & 1 deletion jobs/k3s-agent/spec
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ templates:
config/registry.ca.erb: config/registry.ca
config/registry.cert.erb: config/registry.cert
config/registry.key.erb: config/registry.key

config/token.csv.erb: config/token.csv

# Documentation https://bosh.io/docs/links.html
# Tutorial https://gist.github.com/Amit-PivotalLabs/c39528248b8cdc4ba8e347f8aa68abb6
Expand Down Expand Up @@ -105,6 +105,9 @@ properties:
k3s.drain.selector: #Not implemented
description: Selector (label query) to filter on

#token-file
k3s.token-file-content:
description: token-file content. see https://kubernetes.io/docs/reference/access-authn-authz/authentication/#static-token-file

## args

Expand Down
4 changes: 4 additions & 0 deletions jobs/k3s-agent/templates/bin/ctl.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ case $1 in

export K3S_NODE_NAME=<%= spec.name %>-<%= spec.index %>

<% if_p('k3s.token-file-content') do |value| %>
export K3S_TOKEN_FILE=/var/vcap/jobs/k3s-agent/config/token.csv
<% end %>

export FLAGS=""

<% if_p('k3s.node-labels') do |value| %>
Expand Down
2 changes: 2 additions & 0 deletions jobs/k3s-agent/templates/config/token.csv.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<% if_p('k3s.token-file-content') do |value| %><%= p('k3s.token-file-content') %>
<% end %>
3 changes: 1 addition & 2 deletions jobs/k3s-server/templates/config/token.csv.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
<% if_p('k3s.token-file-content') do |value| %>
<%= p('k3s.token-file-content') %>
<% if_p('k3s.token-file-content') do |value| %><%= p('k3s.token-file-content') %>
<% end %>
2 changes: 2 additions & 0 deletions releases/k3s/index.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
builds:
1f11d32d-302c-4c7e-7dd4-0cadc1dae96a:
version: "9"
2cb16202-97c5-4021-4228-e1f413e5b991:
version: "12"
30048db2-3d9d-40cc-4dd7-5ca02ff12b66:
version: "4"
4bd13971-4d5f-45ef-71cd-8b9f587f8fa1:
Expand Down
52 changes: 52 additions & 0 deletions releases/k3s/k3s-12.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: k3s
version: "12"
commit_hash: fb8e48f
uncommitted_changes: false
jobs:
- name: k3s-agent
version: a4d175996786ee5d1f915411a05765fa4174895bb3b00d077c60488b42119595
fingerprint: a4d175996786ee5d1f915411a05765fa4174895bb3b00d077c60488b42119595
sha1: sha256:3f6e549c4989d7febabb3287aa9bdf54a9b9a32679129a9b34e0ee47d2bf5719
packages:
- k3s
- kubectl-k3s
- k3s-images
- name: k3s-airgaped-images
version: 99126a51b26e8df4e7009e55869d8167bc9f554aed95f3eef688a1e13f669f2b
fingerprint: 99126a51b26e8df4e7009e55869d8167bc9f554aed95f3eef688a1e13f669f2b
sha1: sha256:9c4a0f047fa7c3f4a9a1d55f6686378979a292158147746296ed4b94eb8dd5ba
packages:
- k3s-images
- name: k3s-server
version: 4a63251d56d91b2e03518ab4362f9835f4583b5e808ef02007b8afbc45877a87
fingerprint: 4a63251d56d91b2e03518ab4362f9835f4583b5e808ef02007b8afbc45877a87
sha1: sha256:2a7eec90a8cb8fffab550d7c08b143f9a55559ad1cc90dd2f01ca2f4c8c33dba
packages:
- k3s
- k9s
- kubectl-k3s
packages:
- name: k3s
version: be8e322774147b362f8e38416fbd6441f048c2f3d80e1af7fd3ef50b5af44f7b
fingerprint: be8e322774147b362f8e38416fbd6441f048c2f3d80e1af7fd3ef50b5af44f7b
sha1: sha256:4ffe7859778fe56ab0e40aeb787ffdf001a5a6f543e9e93e228f475189879341
dependencies: []
- name: k3s-images
version: 9b62788662a8bcdbba54b87f296239ff6e030f6f4810733301a877e627d080d3
fingerprint: 9b62788662a8bcdbba54b87f296239ff6e030f6f4810733301a877e627d080d3
sha1: sha256:ca55c357e28ce2a354374ce4a6b48c7c48b7be0655eeafabc1025b6c3a8a7765
dependencies: []
- name: k9s
version: 24b739026ef4bf491afc64ba3f32f7373dfe02e72f3f12a99af4f2c2b0eb106b
fingerprint: 24b739026ef4bf491afc64ba3f32f7373dfe02e72f3f12a99af4f2c2b0eb106b
sha1: sha256:c1cffd40cbbb48bd80a35acf981d428051740da0c68835de7bede43d24cb3ece
dependencies: []
- name: kubectl-k3s
version: 41fe074fc5fe879b1909bdc82b3050c42b94e2d4aa945de2ce4e5f5737feb8dc
fingerprint: 41fe074fc5fe879b1909bdc82b3050c42b94e2d4aa945de2ce4e5f5737feb8dc
sha1: sha256:79ec01ab7c166b7121052ee44ce0109bb0318bb8e14e5e23c7b1d9dc5f619910
dependencies: []
license:
version: cf0ca1fe65dee9607c7bb9460a3f20835e582cbb7f5b2c3625fba2e21d7e91b9
fingerprint: cf0ca1fe65dee9607c7bb9460a3f20835e582cbb7f5b2c3625fba2e21d7e91b9
sha1: sha256:cbe3175489dfaec91e9f392399fbfb68e008885feb91a3b8d493a35d2fc5a8fa

0 comments on commit a8d4627

Please sign in to comment.