8000 Common structs for Helm by alpeb · Pull Request #3161 · linkerd/linkerd2 · GitHub
[go: up one dir, main page]

Skip to content
< 8000 link rel="preload" as="image" href="https://github.githubassets.com/assets/platform-dark-ac89fbf373737ed3.png"/>
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions pkg/inject/template-values.go
8000
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
package inject

type (
// Values contains the top-level elements in the Helm charts
Values struct {
Namespace string
ClusterDomain string
HighAvailability bool
Identity *Identity

Proxy *Proxy
ProxyInit *ProxyInit
}

// Proxy contains the fields to set the proxy sidecar container
Proxy struct {
Capabilities *Capabilities
Component string
DisableIdentity bool
DisableTap bool
EnableExternalProfile bool
Image *Image
LogLevel string
SAMountPath *SAMountPath
Ports *Ports
Resources *Resources
UID int64
}

// ProxyInit contains the fields to set the proxy-init container
ProxyInit struct {
Capabilities *Capabilities
IgnoreInboundPorts string
@siggy siggy Jul 31, 2019 •
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can/should this be an array?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah we might. WDYT @ihcsim ?

@ihcsim ihcsim Jul 31, 2019 •
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value of this variable eventually gets mapped into the args of the proxy-init container. From a rendering perspective, I think it should remain as string. Otherwise, won't we end up with something like:

  initContainers:
  - args:
    ...
    - --inbound-ports-to-ignore
    - [4190,4191]
    - --outbound-ports-to-ignore
    - ["443"] 

IgnoreOutboundPorts string
Image *Image
SAMountPath *SAMountPath
Resources *Resources
}

// DebugContainer contains the fields to set the debugging sidecar
DebugContainer struct {
Image *Image
}

// Image contains the details to define a container image
Image struct {
Name string
PullPolicy string
Version string
}

// Ports contains all the port-related setups
Ports struct {
Admin int32
Control int32
Inbound int32
Outbound int32
}

// Constraints wraps the Limit and Request settings for computational resources
Constraints struct {
Limit string
Request string
}

// Capabilities contains the SecurityContext capabilities to add/drop into the injected
// containers
Capabilities struct {
Add []string
Drop []string
}

// SAMountPath contains the details for ServiceAccount volume mount
SAMountPath struct {
Name string
MountPath string
}

// Resources represents the computational resources setup for a given container
Resources struct {
CPU Constraints
Memory Constraints
}

// Identity contains the fields to set the identity variables in the proxy
// sidecar container
Identity struct {
TrustAnchorsPEM string
TrustDomain string
}
)
0