-
Notifications
You must be signed in to change notification settings - Fork 474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Statefulset support #1903
Comments
I'm surprised, Statefulset is among the workload kinds kiali is supposed to fetch: https://github.com/kiali/kiali/blob/master/business/workloads.go#L251-L261 Does it have the correct app label set on it? If possible, it would be nice to see the Statefulset yaml - amend anything you would need to hide |
apiVersion: apps/v1
kind: StatefulSet
metadata:
creationTimestamp: "2019-11-07T16:08:19Z"
generation: 4
labels:
app: my-service
version: stable
name: my-service
namespace: default
resourceVersion: "5913223"
selfLink: /apis/apps/v1/namespaces/default/statefulsets/my-service
uid: d090e18f-0178-11ea-8f65-0a952dda548a
spec:
podManagementPolicy: Parallel
replicas: 2
revisionHistoryLimit: 10
selector:
matchLabels:
app: my-service
version: stable
serviceName: my-service
template:
metadata:
annotations:
traffic.sidecar.istio.io/excludeOutboundIPRanges: 0.0.0.0/0
creationTimestamp: null
labels:
app: my-service
version: stable
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- my-service
topologyKey: failure-domain.beta.kubernetes.io/zone
weight: 100
automountServiceAccountToken: true
containers:
- env:
- name: NODE_ENV
value: development
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: KUBERNETES_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: POD_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
image: my-service
imagePullPolicy: Always
name: my-service
ports:
- containerPort: 8080
name: http-app
protocol: TCP
securityContext:
allowPrivilegeEscalation: true
privileged: false
readOnlyRootFilesystem: false
runAsGroup: 1337
runAsNonRoot: false
runAsUser: 0
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
serviceAccount: my-service
serviceAccountName: my-service
shareProcessNamespace: false
terminationGracePeriodSeconds: 60
updateStrategy:
rollingUpdate:
partition: 1
type: RollingUpdate
status:
collisionCount: 0
currentReplicas: 1
currentRevision: my-service-6bdbb7d45d
observedGeneration: 4
readyReplicas: 2
replicas: 2
updateRevision: my-service-69d6d4d8c8
updatedReplicas: 1
|
There are similar issues encountered when creating Bookinfo workloads of type 'StatefulSet' and 'ReplicationController' by applying the following Bookinfo test yaml:
After applying the above yaml, the API call 'api/namespaces/bookinfo/workloads' does not return reviews-v5 (ReplicationController) and reviews-v6 (StatefulSet). Issue was flushed out by E2E test |
Assigning to @lucasponce for review as this is related to cache/optimization work in this commit from 21 days ago. It looks to be intentional but could be considered a breaking change in behavior for Kiali v1.8+. For efficiency Kiali no longer fetches all workload kinds, presumably because there are so many kinds and many of those kinds are not frequently used. The filtered kinds are currently:
The good news is it's configurable. So, to see the StatefulSets you need to remove it from the excluded workload kinds: If installed with the Kiali Operator then edit the Kiali CR and add an entry for exclude_workloads. Add only those you want to exclude (i.e. don't use). So, if you use everything other than CronJob and Job:
The Kiali operator will pick up and apply the change. If you install with Helm charts then edit the Kiali configMap in a similar way. |
@jshaughn the suggested change to the Kiali CR resolved the issue. |
cc @yacut see above ^ |
@jshaughn It's works now. Thank you |
@yacut @mattmahoneyrh @jshaughn Yes, you are right, it's configurable, by default Kiali fetched every kind of controller and that added extra-pressure on kubernetes API adding more latency by default. Now, it's configurable and user can configure the controllers that are fetched by Kiali. Also this feedback is good, @yacut can you also add more info about your sceneario ? I mean, to see how many other controllers are used (i.e. we have feedback that Jobs are very uncommon together with Istio scenarios). [1] https://github.com/kiali/kiali/blob/master/operator/deploy/kiali/kiali_cr.yaml#L452 |
* Support more powerful graph find/hide expressions. Make better use of disjuntive selectors to enhance handling of OR/AND. kiali#3165
General remarks
Kiali does not supports statefulset apps.
Describe the bug
If you use k8s statefulset instead of k8s deployment for your app, than kiali will not display any workload for the app.
Versions used
Kiali: v1.9
Istio: 1.3.4
Kubernetes flavour and version: GKE 1.13.11-gke.9
To Reproduce
Steps to reproduce the behavior:
Expected behavior
All statefulset workloads are shown as in the case of standard deployment workloads
The text was updated successfully, but these errors were encountered: