Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Support envoy pod template with basic fields #378

Open
r0bj opened this issue Jun 2, 2021 · 3 comments
Open

Support envoy pod template with basic fields #378

r0bj opened this issue Jun 2, 2021 · 3 comments
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.

Comments

@r0bj
Copy link

r0bj commented Jun 2, 2021

Please describe the problem you have
[A clear, concise, description of the problem you are facing. What is the problem that feature X would solve for you?]

It would be useful to be able to specify envoy pod template with basic fields like:

  • labels
  • annotations
  • securityContext
  • resources
    etc.

In some environments/clusters there are specific requirements for pod labels (e.g. mandatory label team, owner, contact, etc.). Other use case is for specific annotation which can be used to define pod log destination or other parameters.

@r0bj r0bj added the kind/feature Categorizes issue or PR as related to a new feature. label Jun 2, 2021
@danehans
Copy link
Contributor

danehans commented Jun 9, 2021

@r0bj in my experience template-based approaches become very difficult to manage. Instead of exposing a "pod template" through the API, I would like to address each of the above bullets in a specific manner. Using labels as an example, we can have the operator append labels defined in the Contour to the operands:

apiVersion: operator.projectcontour.io/v1alpha1
kind: Contour
metadata:
  name: contour-sample
  namespace: projectcontour
  labels:
    environment: production
    app: foo
spec:
...

# Results in operands having the labels:
apiVersion: apps/v1
kind: DeamonSet
metadata:
  name: envoy
  namespace: projectcontour
  labels:
    environment: production
    app: foo
 ...

A similar approach can be taken for custom annotations.

We already have an issue for managing SCCs: #112.

What do you think about these approaches?

@danehans danehans added the good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. label Jun 9, 2021
@r0bj
Copy link
Author

r0bj commented Jun 10, 2021

Sure, it would be less flexible but it would work. Partly my inspiration was prometheus-operator where you can define podMetadata and also separate fields for: affinity, tolerations, securityContext, resources, etc. Similarly cert-manager and its ClusterIssuer: you can configure podTemplate with labels, annotations, nodeSelector, etc.

@danehans
Copy link
Contributor

xref #373 for tolerations/nodeSelector support of Envoy pods.

dmorgan81 added a commit to dmorgan81/contour-operator that referenced this issue Jul 6, 2021
Allow setting custom security contexts for both contour deployments and
envoy daemonsets. The default value is unpriviledged and is equivalent
to the following:

contourSecurityContext:
  runAsUser: 65534
  runAsGroup: 65534
  runAsNonRoot: true

Fixes projectcontour#112
Updates projectcontour#378
dmorgan81 added a commit to dmorgan81/contour-operator that referenced this issue Jul 6, 2021
Allow setting custom security contexts for both contour deployments and
envoy daemonsets. The default value is unpriviledged and is equivalent
to the following:

contourSecurityContext:
  runAsUser: 65534
  runAsGroup: 65534
  runAsNonRoot: true

Fixes projectcontour#112
Updates projectcontour#378

Signed-off-by: David Morgan <[email protected]>
dmorgan81 added a commit to dmorgan81/contour-operator that referenced this issue Sep 30, 2021
Allow setting custom security contexts for both contour deployments and
envoy daemonsets. The default value is unpriviledged and is equivalent
to the following:

contourSecurityContext:
  runAsUser: 65534
  runAsGroup: 65534
  runAsNonRoot: true

Fixes projectcontour#112
Updates projectcontour#378

Signed-off-by: David Morgan <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants