-
Notifications
You must be signed in to change notification settings - Fork 41
Log what resources are created in K8s #52
Comments
Seems to be a few concerns here:
|
To quickly answer whether the "status" field gets written to, it does get populated with info that differs somewhat versus that which gets logged to the pods stdout (which is what I believe populates the output of Looking at the
Whereas the (truncated) log output of the operator is:
|
Great timing @jsm84. I don't think this will completely answer your need, but check out the latest PR I submitted this morning (#51), which includes a commit with a bunch of logging updates that makes it more obvious what's happening (and feel free to leave comments). A few things not present in that PR that still need to be done are:
I think the status @robszumski was referring to is the CR status, not the helm operator. It contains the full release information (e.g. release name and manifests) for the currently deployed release. |
Here's an example from #51: Log output: $ API_VERSION=apache.org/v1alpha1 HELM_CHART=~/work/helm-app-operator/charts/tomcat/ KIND=Tomcat operator-sdk up local
INFO[0000] Go Version: go1.10.4
INFO[0000] Go OS/Arch: linux/amd64
INFO[0000] operator-sdk Version: 0.0.6+git
INFO[0000] Registering Components.
INFO[0000] Watching apache.org/v1alpha1, Tomcat, default, 5000000000
INFO[0000] Starting the Cmd.
INFO[0008] Installed release for apiVersion=apache.org/v1alpha1 kind=Tomcat name=default/app1 release=helm-app-operator-app1
INFO[0008] Reconciled release for apiVersion=apache.org/v1alpha1 kind=Tomcat name=default/app1 release=helm-app-operator-app1
INFO[0013] Reconciled release for apiVersion=apache.org/v1alpha1 kind=Tomcat name=default/app1 release=helm-app-operator-app1
INFO[0018] Reconciled release for apiVersion=apache.org/v1alpha1 kind=Tomcat name=default/app1 release=helm-app-operator-app1
INFO[0023] Reconciled release for apiVersion=apache.org/v1alpha1 kind=Tomcat name=default/app1 release=helm-app-operator-app1
INFO[0028] Reconciled release for apiVersion=apache.org/v1alpha1 kind=Tomcat name=default/app1 release=helm-app-operator-app1
INFO[0033] Reconciled release for apiVersion=apache.org/v1alpha1 kind=Tomcat name=default/app1 release=helm-app-operator-app1
INFO[0037] Updated release for apiVersion=apache.org/v1alpha1 kind=Tomcat name=default/app1 release=helm-app-operator-app1
INFO[0037] Reconciled release for apiVersion=apache.org/v1alpha1 kind=Tomcat name=default/app1 release=helm-app-operator-app1
INFO[0039] Reconciled release for apiVersion=apache.org/v1alpha1 kind=Tomcat name=default/app1 release=helm-app-operator-app1
INFO[0044] Reconciled release for apiVersion=apache.org/v1alpha1 kind=Tomcat name=default/app1 release=helm-app-operator-app1
INFO[0049] Reconciled release for apiVersion=apache.org/v1alpha1 kind=Tomcat name=default/app1 release=helm-app-operator-app1
INFO[0054] Reconciled release for apiVersion=apache.org/v1alpha1 kind=Tomcat name=default/app1 release=helm-app-operator-app1
INFO[0059] Reconciled release for apiVersion=apache.org/v1alpha1 kind=Tomcat name=default/app1 release=helm-app-operator-app1
INFO[0064] Reconciled release for apiVersion=apache.org/v1alpha1 kind=Tomcat name=default/app1 release=helm-app-operator-app1
INFO[0069] Reconciled release for apiVersion=apache.org/v1alpha1 kind=Tomcat name=default/app1 release=helm-app-operator-app1
INFO[0071] Uninstalled release for apiVersion=apache.org/v1alpha1 kind=Tomcat name=default/app1 release=helm-app-operator-app1 CR status: status:
lastTransitionTime: 2018-10-15T19:21:11Z
lastUpdateTime: 2018-10-15T19:21:11Z
phase: Applied
reason: ApplySuccessful
release:
chart:
files:
- type_url: README.md
value: IyBUb21jYXQKCltUb21jYXRdKGh0dHA6Ly90b21jYXQuYXBhY2hlLm9yZykgaXMgaXMgYW4gb3BlbiBzb3VyY2UgaW1wbGVtZW50YXRpb24gb2YgdGhlIEphdmEgU2VydmxldCwgSmF2YVNlcnZlciBQYWdlcywgSmF2YSBFeHByZXNzaW9uIExhbmd1YWdlIGFuZCBKYXZhIFdlYlNvY2tldCB0ZWNobm9sb2dpZXMuCgojIyBJbnRyb2R1Y3Rpb24KClRoaXMgY2hhcnQgY3JlYXRlcyBhIFt0b21jYXQgYXBwbGljYXRpb24gc2VydmVyXShodHRwOi8vdG9tY2F0LmFwYWNoZS5vcmcpIERlcGxveW1lbnQsIHBsdXMgaHR0cCBTZXJ2aWNlcyBmb3IgdGhlIHNlcnZlci4KVGhlIGNoYXJ0IG9mZm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YWcuICAgICAgICAgICAgICAgICB8IGA3LjBgCmBpbWFnZS5wdWxsUG9saWN5YCAgICAgICAgICAgICAgfCBJbWFnZSBwdWxsIHBvbGljeSAgICAgICAgICAgICAgICAgICAgIHwgYElmTm90UHJlc2VudGAKYGRlcGxveS5kaXJlY3RvcnlgICAgICAgICAgICAgICB8IFdlYmFyY2hpdmUgZGVwbG95bWVudCBkaXJlY3RvcnkgICAgICAgfCBgL3Vzci9sb2NhbC90b21jYXQvd2ViYXBwc2AKYHNlcnZpY2UubmFtZWAgICAgICAgICAgICAgICAgICB8IFRvbWNhdCBzZXJ2aWNlIG5hbWUgICAgICAgICAgICAgICAgICAgfCBgaHR0cGAKYHNlcnZpY2UuZXh0ZXJuYWxQb3J0YCAgICAgICAgICB8IEt1YmVybmV0ZXMgc2VydmljZSBwb3J0ICAgICAgICAgICAgICAgfCBgODBgCmBzZXJ2aWNlLmludGVybmFsUG9ydGAgICAgICAgICAgfCBUb21jYXQgZnJvbnQgcG9ydCAgICAgICAgICAgICAgICAgICAgIHwgYDgwODBgCmBzZXJ2aWNlLnR5cGVgICAgICAgICAgICAgICAgICAgfCBLdWJlcm5ldGVzIHNlcnZpY2UgdHlwZSAgICAgICAgICAgICAgIHwgYExvYWRCYWxhbmNlcmAKYHJlc291cmNlc2AgICAgICAgICAgICAgICAgICAgICB8IENQVS9NZW1vcnkgcmVzb3VyY2UgcmVxdWVzdHMvbGltaXRzICAgfCBge31gCmBub2RlU2VsZWN0b3JgICAgICAgICAgICAgICAgICAgfCBOb2RlIGFmZmluaXR5ICAgICAgICAgICAgICAgICAgICAgICAgIHwgYHt9YApgdG9sZXJhdGlvbnNgICAgICAgICAgICAgICAgICAgIHwgTm9kZSB0b2xlcmF0aW9ucyAgICAgICAgICAgICAgICAgICAgICB8IGB7fWAKClJlZmVyIHRvIFt2YWx1ZXMueWFtbF0odmFsdWVzLnlhbWwpIGZvciB0aGUgZnVsbCBydW4tZG93biBvbiBkZWZhdWx0cy4gVGhlc2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Tm9kZSwgYW5kIGV4aXN0cyBhcyBsb25nIGFzIHRoYXQgUG9kIGlzIHJ1bm5pbmcgb24gdGhhdCBub2RlLiBXaGVuIGEgUG9kIGlzIHJlbW92ZWQgZnJvbSBhIG5vZGUgZm9yIGFueSByZWFzb24sIHRoZSBkYXRhIGluIHRoZSBlbXB0eURpciBpcyBkZWxldGVkIGZvcmV2ZXIuIioKCiMjIENyZWRpdHMKCltKYXZhIFdlYiBBcHBsaWNhdGlvbiB3aXRoIFRvbWNhdCBhbmQgU2lkZWNhciBDb250YWluZXJdKGh0dHBzOi8vZ2l0aHViLmNvbS9rdWJlcm5ldGVzL2V4YW1wbGVzL3RyZWUvbWFzdGVyL3N0YWdpbmcvamF2YXdlYi10b21jYXQtc2lkZWNhcikK
metadata:
apiVersion: v1
appVersion: "7"
description: Deploy a basic tomcat application server with sidecar as web
archive container
home: https://github.com/yahavb
icon: http://tomcat.apache.org/res/images/tomcat.png
maintainers:
- email: [email protected]
name: yahavb
name: tomcat
version: 0.1.0
templates:
- data: MS4gR2V0IHRoZSBhcHBsaWNhdGlvbiBVUkwgYnkgcnVubmluZyB0aGVzZSBjb21tYW5kczoKe3stIGlmIC5WYWx1ZXMuaW5ncmVzcy5lbmFibGVkIH19Cnt7LSByYW5nZSAuVmFsdWVzLmluZ3Jlc3MuaG9zdHMgfX0KICBodHRwe3sgaWYgJC5WYWx1ZXMuaW5ncmVzcy50bHMgfX1ze3sgZW5kIH19Oi8ve3sgLiB9fXt7ICQuVmFsdWVzLmluZ3Jlc3MucGF0aCB9fQp7ey0gZW5kIH19Cnt7LSBlbHNlIGlmIGNvbnRhaW5zICJOb2RlUG9ydCIgLlZhbHVlcy5zZXJ2aWNlLnR5cGUgfX0KICBleHBvcnQgTk9ERV9QT1JUPSQoa3ViZWN0bCBnZXQgLS1uYW1lc3BhY2Uge3sgLlJlbGVhc2UuTmFtZXNwYWNlIH19IC1vIGpzb25wYXRoPSJ7LnNwZWMucG9ydHNbMF0ubm9kZVB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gc3BlYzoKICAgICAgdm9sdW1lczoKICAgICAgICAtIG5hbWU6IGFwcC12b2x1bWUKICAgICAgICAgIGVtcHR5RGlyOiB7fQogICAgICBjb250YWluZXJzOgogICAgICAgIC0gbmFtZTogd2FyCiAgICAgICAgICBpbWFnZToge3sgLlZhbHVlcy5pbWFnZS53ZWJhcmNoaXZlLnJlcG9zaXRvcnkgfX06e3sgLlZhbHVlcy5pbWFnZS53ZWJhcmNoaXZlLnRhZyB9fQogICAgICAgICAgaW1hZ2VQdWxsUG9saWN5OiB7eyAuVmFsdWVzLmltYWdlLnB1bGxQb2xpY3kgfX0KICAgICAgICAgIHZvbHVtZU1vdW50czoKICAgICAgICAgICAgLSBuYW1lOiBhcHAtdm9sdW1lCiAgICAgICAgICAgICAgbW91bnRQYXRoOiAvYXBwCiAgICAgICAgLSBuYW1lOiB7eyAuQ2hhcnQuTmFtZSB9fQogICAgICAgICAgaW1hZ2U6IHt7IC5WYWx1ZXMuaW1hZ2UudG9tY2F0LnJlcG9zaXRvcnkgfX06e3sgLlZhbHVlcy5pbWFnZS50b21jYXQudGFnIH19CiAgICAgICAgICBpbWFnZVB1bGxQb2xpY3k6IHt7IC5WYWx1ZXMuaW1hZ2UucHVsbFBvbGljeSB9fQogICAgICAgICAgdm9sdW1lTW91bnRzOgogICAgICAgICAgICAtIG5hbWU6IGFwcC12b2x1bWUKICAgICAgICAgICAgICBtb3VudFBhdGg6IHt7IC5WYWx1ZXMuZGVwbG95LmRpcmVjdG9yeSB9fQogICAgICAgICAgcG9ydHM6CiAgICAgICAgICAgIC0gY29udGFpbmVyUG9ydDoge3sgLlZhbHVlcy5zZXJ2aWNlLmludGVybmFsUG9ydCB9fQogICAgICAgICAgICAgIGhvc3RQb3J0OiA4MDA5CiAgICAgICAgICBsaXZlbmVzc1Byb2JlOgogICAgICAgICAgICBleGVjOgogICAgICAgICAgICAgIGNvbW1hbmQ6CiAgICAgICAgICAgICAgLSBjYXQKICAgICAgICAgICAgICAtIC91c3IvbG9jYWwvdG9tY2F0L3dlYmFwcHMvc2FtcGxlL2luZGV4Lmh0bWwKICAgICAgICAgICAgaW5pdGlhbERlbGF5U2Vjb25kczogMTUKICAgICAgICAgICAgcGVyaW9kU2Vjb25kczogMjAgIAogICAgICAgICAgcmVzb3VyY2VzOgp7eyB0b1lhbWwgLlZhbHVlcy5yZXNvdXJjZXMgfCBpbmRlbnQgMTIgfX0KICAgIHt7LSBpZiAuVmFsdWVzLm5vZGVTZWxlY3RvciB9fQogICAgICBub2RlU2VsZWN0b3I6Cnt7IHRvWWFtbCAuVmFsdWVzLm5vZGVTZWxlY3RvciB8IGluZGVudCA4IH19CiAgICB7ey0gZW5kIH19CiAgICB7ey0gaWYgLlZhbHVlcy50b2xlcmF0aW9ucyB9fQogICAgICB0b2xlcmF0aW9uczoKe3sgdG9ZYW1sIC5WYWx1ZXMudG9sZXJhdGlvbnMgfCBpbmRlbnQgOCB9fQogICAge3stIGVuZCB9fQo=
name: templates/appsrv.yaml
values:
raw: |
# Default values for the chart.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
webarchive:
repository: ananwaresystems/webarchive
tag: "1.0"
tomcat:
repository: tomcat
tag: "7.0"
pullPolicy: IfNotPresent
deploy:
directory: /usr/local/tomcat/webapps
service:
name: http
type: LoadBalancer
externalPort: 80
internalPort: 8080
ingress:
enabled: false
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
path: /
hosts:
- chart-example.local
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
resources: {}
# limits:
# cpu: 100m
# memory: 256Mi
# requests:
# cpu: 100m
# memory: 256Mi
nodeSelector: {}
tolerations: []
affinity: {}
config:
raw: |
replicaCount: 2
info:
Description: Install complete
first_deployed:
nanos: 85377952
seconds: 1539631271
last_deployed:
nanos: 85377952
seconds: 1539631271
status:
code: 1
manifest: |2-
---
# Source: tomcat/templates/appsrv-svc.yaml
apiVersion: v1
kind: Service
metadata:
labels:
app: tomcat
chart: tomcat-0.1.0
heritage: Tiller
release: helm-app-operator-app1
name: helm-app-operator-app1-tomcat
ownerReferences:
- apiVersion: apache.org/v1alpha1
blockOwnerDeletion: true
controller: true
kind: Tomcat
name: app1
uid: 796a2954-d0af-11e8-b1fb-5cba5a134816
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 8080
selector:
app: tomcat
release: helm-app-operator-app1
type: LoadBalancer
---
# Source: tomcat/templates/appsrv.yaml
apiVersion: apps/v1beta2
kind: Deployment
metadata:
labels:
app: tomcat
chart: tomcat-0.1.0
heritage: Tiller
release: helm-app-operator-app1
name: helm-app-operator-app1-tomcat
ownerReferences:
- apiVersion: apache.org/v1alpha1
blockOwnerDeletion: true
controller: true
kind: Tomcat
name: app1
uid: 796a2954-d0af-11e8-b1fb-5cba5a134816
spec:
replicas: 2
selector:
matchLabels:
app: tomcat
release: helm-app-operator-app1
template:
metadata:
labels:
app: tomcat
release: helm-app-operator-app1
spec:
containers:
- image: ananwaresystems/webarchive:1.0
imagePullPolicy: IfNotPresent
name: war
volumeMounts:
- mountPath: /app
name: app-volume
- image: tomcat:7.0
imagePullPolicy: IfNotPresent
livenessProbe:
exec:
command:
- cat
- /usr/local/tomcat/webapps/sample/index.html
initialDelaySeconds: 15
periodSeconds: 20
name: tomcat
ports:
- containerPort: 8080
hostPort: 8009
resources: {}
volumeMounts:
- mountPath: /usr/local/tomcat/webapps
name: app-volume
volumes:
- emptyDir: {}
name: app-volume
name: helm-app-operator-app1
namespace: default
version: 1 |
Whoa that's a hell of a status ;) |
I ran into an issue debugging the example Tomcat operator (and a MariaDB example of my own), where the operator processes
cr.yaml
and creates the resources transparently (K8s Deployment and Service objects defined by the chart), but pods themselves are never created as this action was blocked by an OpenShift Security Context Constraint. It appeared as though the operator wasn't actually deploying resources when processingcr.yaml
, however it actually did, it just wasn't obvious by viewing the output ofoc logs <operator-pod-id>
.After giving the code a rough glance, it appears that these messages are logged via logrus. It would be ideal to have something logged in addition to
processing <namespace>/my-tomcat using values: replicaCount: 2
which states the Kind and the name of resources that are created by the Helm operator.The text was updated successfully, but these errors were encountered: