Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
k8s-ingress
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
uplex-varnish
k8s-ingress
Commits
52ac05e5
Commit
52ac05e5
authored
Feb 21, 2021
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a section about dev mode and TemplateConfig to the dev docs.
parent
e81ae6bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
dev.md
docs/dev.md
+41
-0
No files found.
docs/dev.md
View file @
52ac05e5
...
...
@@ -153,3 +153,44 @@ Targets in the Makefile:
necessary, and run
``golint``
and
``go test``
.
*
``clean``
: run
``go clean``
, and clean up other generated artifacts
## dev mode and TemplateConfig
When the controller is started with the
``-devmode``
[
command-line flag
](
ref-cli-options.md
)
, it reads the
``TemplateConfig``
Custom Resource from the kubeserver API; otherwise,
``TemplateConfig``
is ignored, as it is not intended for production use. See the
[
docs
](
/docs/ref-template-cfg.md
)
for the authoritative reference
on
``TemplateConfig``
.
Testing new templates presupposes an understanding of the source code
-- the templates defined in
[
``pkg/varnish/vcl``
](
/pkg/varnish/vcl
)
,
the function maps used for
``text/template``
parsing, and the general
design for VCL generation.
The controller log and Event generation can help monitor the
controller's implementation of
``TemplateConfig``
configuration. The
log emits a message at level
``info``
for each template object that it
successfully updates (meaning that the template was successfully
parsed):
```
time="2021-02-21T17:25:39Z" level=info msg="TemplateConfig dev/viking-ingress-dev-tmplcfg: updated shard template"
```
If any template string cannot be parsed, a message at the
``error``
level is emitted with the error message from
``text/template``
, and
the synchronization attempt for the
``TemplateConfig``
is aborted. The
message also becomes the payload of an Event of type Warning with
reason
``SyncFatalError``
.
If all of the fields specified in the
``TemplateConfig``
can be
processed successfully, the log emits a message at level
``info``
summarizing the fields that were updated:
```
time="2021-02-21T17:25:39Z" level=info msg="add dev/viking-ingress-dev-tmplcfg: successfully synced: TemplateConfig dev/viking-ingress-dev-tmplcfg: updated templates: [ingress acl auth reqDisp rewrite shard]"
```
The message also becomes the payload of an Event of type Info with the
reason
``SyncSuccessful``
.
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment