Entrypoint

Overview

Entrypoint is the special resource that is used as entrypoint of the gateway. Unlike other resources, only one instance is allowed.

This yaml show the Entrypoint definition with empty spec. Because the Entrypoitn resource is special resource that is allowed only single instance, metadata: is not required and is ignored even it is specified.

apiVersion: core/v1
kind: Entrypoint
spec: {}

Resource Definition

Entrypoint is defined in the proto/core/v1/entrypoint.proto

 1syntax = "proto3";
 2package core.v1;
 3
 4import "kernel/resource.proto";
 5
 6option go_package = "github.com/aileron-gateway/aileron-gateway/apis/core/v1";
 7
 8// Entrypoint resource definition.
 9// apiVersion="core/v1", kind="Entrypoint".
10message Entrypoint {
11    string          APIVersion = 1 [json_name = "apiVersion"];
12    string          Kind       = 2 [json_name = "kind"];
13    kernel.Metadata Metadata   = 3 [json_name = "metadata"];
14    EntrypointSpec  Spec       = 4 [json_name = "spec"];
15}
16
17// EntrypointSpec is the Entrypoint specification.
18message EntrypointSpec {
19    // [OPTIONAL]
20    // DefaultLogger is the reference to a Logger object
21    // that will be used from other resources by default.
22    // Object must implement Logger interface.
23    // If not set, pre-defined logger is used.
24    // Default is not set.
25    kernel.Reference DefaultLogger = 1 [json_name = "defaultLogger"];
26
27    // [OPTIONAL]
28    // Loggers is the list of references to logger objects.
29    // Specified loggers can be referred from other resources
30    // by the name "<group>/<version>/<kind>/<namespace>/<name>"
31    // from their metadata field
32    // for example "core/v1/SLogger/myNamespace/myLogger".
33    // Objects must implement logger interface.
34    // Default is not set.
35    repeated kernel.Reference Loggers = 2 [json_name = "loggers"];
36
37    // [OPTIONAL]
38    // DefaultErrorHandler is the reference to a ErrorHandler object
39    // that will be used from other resources by default.
40    // Referred object must implement ErrorHandler interface.
41    // Default ErrorHandler is used when not set.
42    kernel.Reference DefaultErrorHandler = 3 [json_name = "defaultErrorHandler"];
43
44    // [OPTIONAL]
45    // Runners is the list of reference to runner resources.
46    // Referred objects must implement the Runner interface.
47    // HTTPServer is a typical example of the resource that can be set to this field.
48    // The gateway will exit without doing anything
49    // when no runner was specified.
50    // The gateway will exit with failure when one of or all of the
51    // runners exit with an error.
52    repeated kernel.Reference Runners = 4 [json_name = "runners"];
53
54    // [OPTIONAL]
55    // Initializers is the reference to the resources
56    // that should be initialized before creating runners.
57    // Referred objects must implement the Initializer interface.
58    // Default is not set.
59    repeated kernel.Reference Initializers = 5 [json_name = "initializers"];
60
61    // [OPTIONAL]
62    // Finalizers is the reference to the resources
63    // that should be finalized on exit of the gateway.
64    // Referred objects must implement the Finalizer interface.
65    // Default is not set.
66    repeated kernel.Reference Finalizers = 6 [json_name = "finalizers"];
67}

YAML Structure

apiVersion: <string>
kind: <string>
metadata: <object>
  name: <string>
  namespace: <string>
spec: <object>
  defaultLogger: <object>
    apiVersion: <string>
    kind: <string>
    name: <string>
    namespace: <string>
  loggers: <[]object>
    - apiVersion: <string>
      kind: <string>
      name: <string>
      namespace: <string>
  defaultErrorHandler: <object>
    apiVersion: <string>
    kind: <string>
    name: <string>
    namespace: <string>
  runners: <[]object>
    - apiVersion: <string>
      kind: <string>
      name: <string>
      namespace: <string>
  initializers: <[]object>
    - apiVersion: <string>
      kind: <string>
      name: <string>
      namespace: <string>
  finalizers: <[]object>
    - apiVersion: <string>
      kind: <string>
      name: <string>
      namespace: <string>

Examples


Last modified June 7, 2025: add japanese (f2a41f1)