-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support addition of new containers provided as options
If a container or initContainer is provided in options of deployment or statefulset, if a container or initContainer with that name exists, the properties for of that container will be updated with the values provided in options. With that change, if there is no match, the container or initContainer from options will be added to the deployments and statefulsets.
- Loading branch information
1 parent
e5a1789
commit 97b76ef
Showing
7 changed files
with
653 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
188 changes: 188 additions & 0 deletions
188
...mmon/testdata/test-additional-options-test-runtimeclassname-deployment-add-container.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,188 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: tekton-pipelines | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: config-defaults | ||
namespace: tekton-pipelines | ||
creationTimestamp: null | ||
labels: | ||
app.kubernetes.io/instance: default | ||
app.kubernetes.io/part-of: tekton-pipelines | ||
data: | ||
test: "123" | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: config-events | ||
namespace: tekton-pipelines | ||
creationTimestamp: null | ||
data: | ||
event1: no-data | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: config-leader-election | ||
namespace: tekton-pipelines-resolvers | ||
labels: | ||
app.kubernetes.io/component: resolvers | ||
app.kubernetes.io/instance: default | ||
app.kubernetes.io/part-of: tekton-pipelines | ||
data: | ||
buckets: "2" | ||
|
||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: tekton-pipelines-controller | ||
namespace: tekton-pipelines | ||
creationTimestamp: null | ||
labels: | ||
app.kubernetes.io/name: controller | ||
controlled-by-options: "true" | ||
annotations: | ||
hpa-enabled: "false" | ||
status: {} | ||
spec: | ||
strategy: {} | ||
replicas: 4 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: controller | ||
template: | ||
metadata: | ||
creationTimestamp: null | ||
annotations: | ||
annotation-foo: annotation-bar | ||
labels: | ||
app.kubernetes.io/name: controller | ||
label-foo: label-bar | ||
operator.tekton.dev/deployment-spec-applied-hash: 431f8b0948750a2b5e232680c9655a1f | ||
spec: | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: disktype | ||
operator: In | ||
values: | ||
- ssd | ||
- nvme | ||
- ramdisk | ||
priorityClassName: test | ||
runtimeClassName: foo | ||
serviceAccountName: tekton-pipelines-controller | ||
nodeSelector: | ||
zone: east | ||
tolerations: | ||
- key: zone | ||
operator: Equal | ||
value: west | ||
effect: NoSchedule | ||
topologySpreadConstraints: | ||
- maxSkew: 1 | ||
topologyKey: kubernetes.io/hostname | ||
whenUnsatisfiable: DoNotSchedule | ||
labelSelector: | ||
matchLabels: | ||
app: foo | ||
matchLabelKeys: | ||
- pod-template-hash | ||
containers: | ||
- name: container-xyz | ||
resources: {} | ||
- name: tekton-pipelines-controller | ||
image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/controller:v0.50.1@sha256:9025991c337374dadce6d49e29fbcf86b233ab8f5f96748c67293b2285c3e0b6 | ||
args: | ||
- "-entrypoint-image" | ||
- "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/entrypoint:v0.50.1@sha256:0c66040a16142a598d5aa9f310b1cbf66e843aa7114188f5d0ab5d36b463a09b" | ||
- "--disable-ha=false" | ||
volumeMounts: | ||
- name: config-logging | ||
mountPath: /etc/config-logging-tmp | ||
- name: config-registry-cert | ||
mountPath: /etc/config-registry-cert | ||
- name: custom-mount | ||
mountPath: /etc/custom-mount | ||
env: | ||
- name: SYSTEM_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
- name: CONFIG_DEFAULTS_NAME | ||
value: config-defaults | ||
- name: CONFIG_LOGGING_NAME | ||
value: pipeline-config-logging | ||
- name: ENV_FOO | ||
value: bar | ||
- name: ENV_FROM_CONFIG_MAP | ||
valueFrom: | ||
configMapKeyRef: | ||
name: config-map-foo | ||
key: foo | ||
optional: true | ||
resources: | ||
limits: | ||
cpu: "2" | ||
memory: "4Gi" | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: | ||
- "ALL" | ||
runAsUser: 65532 | ||
runAsGroup: 65532 | ||
runAsNonRoot: true | ||
seccompProfile: | ||
type: RuntimeDefault | ||
ports: | ||
- name: probes | ||
containerPort: 8080 | ||
livenessProbe: | ||
httpGet: | ||
path: /health | ||
port: probes | ||
scheme: HTTP | ||
initialDelaySeconds: 5 | ||
periodSeconds: 10 | ||
timeoutSeconds: 5 | ||
readinessProbe: | ||
httpGet: | ||
path: /readiness | ||
port: probes | ||
scheme: HTTP | ||
initialDelaySeconds: 5 | ||
periodSeconds: 10 | ||
timeoutSeconds: 5 | ||
- args: | ||
- --secure-listen-address=0.0.0.0:9443 | ||
- --upstream=http://127.0.0.1:9090/ | ||
- --logtostderr=true | ||
- --v=6 | ||
image: registry.redhat.io/openshift4/ose-kube-rbac-proxy:v4.12 | ||
name: kube-rbac-proxy | ||
resources: | ||
limits: | ||
cpu: 500m | ||
memory: 128Mi | ||
volumes: | ||
- name: config-logging | ||
hostPath: | ||
path: /etc/config-logging | ||
- name: config-registry-cert | ||
configMap: | ||
name: config-registry-cert | ||
- name: my-custom-logs | ||
hostPath: | ||
path: /var/custom/logs |
Oops, something went wrong.