Narrow authorisation to list cluster scoped events in kubernetesHow to propagate kubernetes events from a GKE cluster to google cloud logHeapster fails to get container stats from Kubelet on Kubernetes clusterKubectl apply for a deployment with revHistoryLimit 0 does not delete the old replica set, here is my deploment templateKubernetes monitoring service heapster keeps restartingunable to access kubernetes dashboard via tokenError while accessing Web UI Dashboard using RBACHow to access Kubernetes Dashboard as admin with userid/passwd outside cluster?Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbiddenUnable to create deployments/configmaps from kubectl client with Namespace Admin access in K8sError while accessing Kibana UI using RBACkubeadm install flannel get error, what's wrong?

Prime parity peregrination

Security Patch SUPEE-11155 - Possible issues?

I just started should I accept a farewell lunch for a coworker I don't know?

Movie with Zoltar in a trailer park named Paradise and a boy playing a video game then being recruited by aliens to fight in space

Bin Packing with Relational Penalization

If two black hole event horizons overlap (touch) can they ever separate again?

How to plan the font size in a fiction?

Which is better for keeping data: primary partition or logical partition?

Most important new papers in computational complexity

Can I travel from Germany to England alone as an unaccompanied minor?

What exactly did Ant-Man see that made him say that their plan worked?

Thin wall to block LED light from hitting photodiode?

SRAM Twist Shifter Paired with Shimano Rear Derailleur

Is there a legal way for US presidents to extend their terms beyond two terms of four years?

Will writing actual numbers instead of writing them with letters affect readership?

How can a valley surrounded by mountains be fertile and rainy?

Handling a player (unintentionally) stealing the spotlight

How to securely dispose of a smartphone?

How can I tell what kind of genitals people have without gender?

How receiver knows the exact frequency in the channel to "listen to"?

What is "override advice"?

Adjective for 'made of pus' or 'corrupted by pus' or something of something of pus

Is it okay to fade a human face just to create some space to place important content over it?

How could a satellite follow earth around the sun while staying outside of earth's orbit?



Narrow authorisation to list cluster scoped events in kubernetes


How to propagate kubernetes events from a GKE cluster to google cloud logHeapster fails to get container stats from Kubelet on Kubernetes clusterKubectl apply for a deployment with revHistoryLimit 0 does not delete the old replica set, here is my deploment templateKubernetes monitoring service heapster keeps restartingunable to access kubernetes dashboard via tokenError while accessing Web UI Dashboard using RBACHow to access Kubernetes Dashboard as admin with userid/passwd outside cluster?Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbiddenUnable to create deployments/configmaps from kubectl client with Namespace Admin access in K8sError while accessing Kibana UI using RBACkubeadm install flannel get error, what's wrong?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I am trying to get heapster eventer to work on a cluster with RBAC enabled. Using the same roles that work for /heapster command does not seem to be sufficient.



On running the pod logs fill up with entries like this:



Failed to load events: events is forbidden: User "system:serviceaccount:kube-system:heapster" cannot list events at the cluster scope


Does anyone know the proper authorization for my heapster service account, short of admin rights?



Eventer deployment doc:



kind: Deployment
apiVersion: extensions/v1beta1
metadata:
labels:
k8s-app: eventer
name: eventer
namespace: kube-system
spec:
replicas: 1
selector:
matchLabels:
k8s-app: eventer
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
k8s-app: eventer
spec:
serviceAccountName: heapster
containers:
- name: eventer
image: k8s.gcr.io/heapster-amd64:v1.5.4
imagePullPolicy: IfNotPresent
command:
- /eventer
- --source=kubernetes:https://kubernetes.default
- --sink=log
resources:
limits:
cpu: 100m
memory: 200Mi
requests:
cpu: 100m
memory: 200Mi
terminationMessagePath: /dev/termination-log
restartPolicy: Always
terminationGracePeriodSeconds: 30


RBAC:



# Original: https://brookbach.com/2018/10/29/Heapster-on-Kubernetes-1.11.3.html
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: heapster
rules:
- apiGroups:
- ""
resources:
- pods
- nodes
- namespaces
- events
verbs:
- get
- list
- watch
- apiGroups:
- extensions
resources:
- deployments
verbs:
- get
- list
- update
- watch
- apiGroups:
- ""
resources:
- nodes/stats
verbs:
- get


Cluster role binding:



# Original: https://github.com/kubernetes-retired/heapster/blob/master/deploy/kube-config/rbac/heapster-rbac.yaml
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: heapster
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: heapster
subjects:
- kind: ServiceAccount
name: heapster
namespace: kube-system


Related question:
How to propagate kubernetes events from a GKE cluster to google cloud log










share|improve this question






























    1















    I am trying to get heapster eventer to work on a cluster with RBAC enabled. Using the same roles that work for /heapster command does not seem to be sufficient.



    On running the pod logs fill up with entries like this:



    Failed to load events: events is forbidden: User "system:serviceaccount:kube-system:heapster" cannot list events at the cluster scope


    Does anyone know the proper authorization for my heapster service account, short of admin rights?



    Eventer deployment doc:



    kind: Deployment
    apiVersion: extensions/v1beta1
    metadata:
    labels:
    k8s-app: eventer
    name: eventer
    namespace: kube-system
    spec:
    replicas: 1
    selector:
    matchLabels:
    k8s-app: eventer
    strategy:
    rollingUpdate:
    maxSurge: 1
    maxUnavailable: 1
    type: RollingUpdate
    template:
    metadata:
    labels:
    k8s-app: eventer
    spec:
    serviceAccountName: heapster
    containers:
    - name: eventer
    image: k8s.gcr.io/heapster-amd64:v1.5.4
    imagePullPolicy: IfNotPresent
    command:
    - /eventer
    - --source=kubernetes:https://kubernetes.default
    - --sink=log
    resources:
    limits:
    cpu: 100m
    memory: 200Mi
    requests:
    cpu: 100m
    memory: 200Mi
    terminationMessagePath: /dev/termination-log
    restartPolicy: Always
    terminationGracePeriodSeconds: 30


    RBAC:



    # Original: https://brookbach.com/2018/10/29/Heapster-on-Kubernetes-1.11.3.html
    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRole
    metadata:
    name: heapster
    rules:
    - apiGroups:
    - ""
    resources:
    - pods
    - nodes
    - namespaces
    - events
    verbs:
    - get
    - list
    - watch
    - apiGroups:
    - extensions
    resources:
    - deployments
    verbs:
    - get
    - list
    - update
    - watch
    - apiGroups:
    - ""
    resources:
    - nodes/stats
    verbs:
    - get


    Cluster role binding:



    # Original: https://github.com/kubernetes-retired/heapster/blob/master/deploy/kube-config/rbac/heapster-rbac.yaml
    kind: ClusterRoleBinding
    apiVersion: rbac.authorization.k8s.io/v1beta1
    metadata:
    name: heapster
    roleRef:
    apiGroup: rbac.authorization.k8s.io
    kind: ClusterRole
    name: heapster
    subjects:
    - kind: ServiceAccount
    name: heapster
    namespace: kube-system


    Related question:
    How to propagate kubernetes events from a GKE cluster to google cloud log










    share|improve this question


























      1












      1








      1








      I am trying to get heapster eventer to work on a cluster with RBAC enabled. Using the same roles that work for /heapster command does not seem to be sufficient.



      On running the pod logs fill up with entries like this:



      Failed to load events: events is forbidden: User "system:serviceaccount:kube-system:heapster" cannot list events at the cluster scope


      Does anyone know the proper authorization for my heapster service account, short of admin rights?



      Eventer deployment doc:



      kind: Deployment
      apiVersion: extensions/v1beta1
      metadata:
      labels:
      k8s-app: eventer
      name: eventer
      namespace: kube-system
      spec:
      replicas: 1
      selector:
      matchLabels:
      k8s-app: eventer
      strategy:
      rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
      type: RollingUpdate
      template:
      metadata:
      labels:
      k8s-app: eventer
      spec:
      serviceAccountName: heapster
      containers:
      - name: eventer
      image: k8s.gcr.io/heapster-amd64:v1.5.4
      imagePullPolicy: IfNotPresent
      command:
      - /eventer
      - --source=kubernetes:https://kubernetes.default
      - --sink=log
      resources:
      limits:
      cpu: 100m
      memory: 200Mi
      requests:
      cpu: 100m
      memory: 200Mi
      terminationMessagePath: /dev/termination-log
      restartPolicy: Always
      terminationGracePeriodSeconds: 30


      RBAC:



      # Original: https://brookbach.com/2018/10/29/Heapster-on-Kubernetes-1.11.3.html
      apiVersion: rbac.authorization.k8s.io/v1
      kind: ClusterRole
      metadata:
      name: heapster
      rules:
      - apiGroups:
      - ""
      resources:
      - pods
      - nodes
      - namespaces
      - events
      verbs:
      - get
      - list
      - watch
      - apiGroups:
      - extensions
      resources:
      - deployments
      verbs:
      - get
      - list
      - update
      - watch
      - apiGroups:
      - ""
      resources:
      - nodes/stats
      verbs:
      - get


      Cluster role binding:



      # Original: https://github.com/kubernetes-retired/heapster/blob/master/deploy/kube-config/rbac/heapster-rbac.yaml
      kind: ClusterRoleBinding
      apiVersion: rbac.authorization.k8s.io/v1beta1
      metadata:
      name: heapster
      roleRef:
      apiGroup: rbac.authorization.k8s.io
      kind: ClusterRole
      name: heapster
      subjects:
      - kind: ServiceAccount
      name: heapster
      namespace: kube-system


      Related question:
      How to propagate kubernetes events from a GKE cluster to google cloud log










      share|improve this question
















      I am trying to get heapster eventer to work on a cluster with RBAC enabled. Using the same roles that work for /heapster command does not seem to be sufficient.



      On running the pod logs fill up with entries like this:



      Failed to load events: events is forbidden: User "system:serviceaccount:kube-system:heapster" cannot list events at the cluster scope


      Does anyone know the proper authorization for my heapster service account, short of admin rights?



      Eventer deployment doc:



      kind: Deployment
      apiVersion: extensions/v1beta1
      metadata:
      labels:
      k8s-app: eventer
      name: eventer
      namespace: kube-system
      spec:
      replicas: 1
      selector:
      matchLabels:
      k8s-app: eventer
      strategy:
      rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
      type: RollingUpdate
      template:
      metadata:
      labels:
      k8s-app: eventer
      spec:
      serviceAccountName: heapster
      containers:
      - name: eventer
      image: k8s.gcr.io/heapster-amd64:v1.5.4
      imagePullPolicy: IfNotPresent
      command:
      - /eventer
      - --source=kubernetes:https://kubernetes.default
      - --sink=log
      resources:
      limits:
      cpu: 100m
      memory: 200Mi
      requests:
      cpu: 100m
      memory: 200Mi
      terminationMessagePath: /dev/termination-log
      restartPolicy: Always
      terminationGracePeriodSeconds: 30


      RBAC:



      # Original: https://brookbach.com/2018/10/29/Heapster-on-Kubernetes-1.11.3.html
      apiVersion: rbac.authorization.k8s.io/v1
      kind: ClusterRole
      metadata:
      name: heapster
      rules:
      - apiGroups:
      - ""
      resources:
      - pods
      - nodes
      - namespaces
      - events
      verbs:
      - get
      - list
      - watch
      - apiGroups:
      - extensions
      resources:
      - deployments
      verbs:
      - get
      - list
      - update
      - watch
      - apiGroups:
      - ""
      resources:
      - nodes/stats
      verbs:
      - get


      Cluster role binding:



      # Original: https://github.com/kubernetes-retired/heapster/blob/master/deploy/kube-config/rbac/heapster-rbac.yaml
      kind: ClusterRoleBinding
      apiVersion: rbac.authorization.k8s.io/v1beta1
      metadata:
      name: heapster
      roleRef:
      apiGroup: rbac.authorization.k8s.io
      kind: ClusterRole
      name: heapster
      subjects:
      - kind: ServiceAccount
      name: heapster
      namespace: kube-system


      Related question:
      How to propagate kubernetes events from a GKE cluster to google cloud log







      logging kubernetes heapster






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 25 at 14:22







      Gudlaugur Egilsson

















      asked Mar 25 at 14:16









      Gudlaugur EgilssonGudlaugur Egilsson

      1,7831 gold badge17 silver badges18 bronze badges




      1,7831 gold badge17 silver badges18 bronze badges






















          1 Answer
          1






          active

          oldest

          votes


















          1














          All of the above objects seem to be correct to me.



          It's just a hunch but perhaps you created the Deployment first and then the ClusterRole and/or ClusterBindingRole and/or the ServiceAccount itself. Make sure you have these 3 first, then delete the current heapster Pods (or the Deployment, and wait for the Pod to terminate before recreating the Deployment).



          (Create the ServiceAccount by kubectl create sa heapster -n kube-system)



          Also, you can test if ServiceAccount can list the events by:



          kubectl get ev --all-namespaces --as system:serviceaccount:kube-system:heapster





          share|improve this answer

























          • That is a very useful command to know. But no luck, I get the same message from this command as appears in the log. > kubectl get ev --all-namespaces --as system:serviceaccount:kube-system:heapster Error from server (Forbidden): events is forbidden: User "system:serviceaccount:kube-system:heapster" cannot list events at the cluster scope

            – Gudlaugur Egilsson
            Mar 26 at 6:44












          • The interesting thing is that I have tested that role & binding with the kubectl command quoted and it works for me! Can you kubectl version please? I want to get to the bottom of this, of I can

            – Janos Lenart
            Mar 26 at 7:15












          • Server v1.10.2 and client v1.10.11.

            – Gudlaugur Egilsson
            Mar 26 at 16:06










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55339863%2fnarrow-authorisation-to-list-cluster-scoped-events-in-kubernetes%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          All of the above objects seem to be correct to me.



          It's just a hunch but perhaps you created the Deployment first and then the ClusterRole and/or ClusterBindingRole and/or the ServiceAccount itself. Make sure you have these 3 first, then delete the current heapster Pods (or the Deployment, and wait for the Pod to terminate before recreating the Deployment).



          (Create the ServiceAccount by kubectl create sa heapster -n kube-system)



          Also, you can test if ServiceAccount can list the events by:



          kubectl get ev --all-namespaces --as system:serviceaccount:kube-system:heapster





          share|improve this answer

























          • That is a very useful command to know. But no luck, I get the same message from this command as appears in the log. > kubectl get ev --all-namespaces --as system:serviceaccount:kube-system:heapster Error from server (Forbidden): events is forbidden: User "system:serviceaccount:kube-system:heapster" cannot list events at the cluster scope

            – Gudlaugur Egilsson
            Mar 26 at 6:44












          • The interesting thing is that I have tested that role & binding with the kubectl command quoted and it works for me! Can you kubectl version please? I want to get to the bottom of this, of I can

            – Janos Lenart
            Mar 26 at 7:15












          • Server v1.10.2 and client v1.10.11.

            – Gudlaugur Egilsson
            Mar 26 at 16:06















          1














          All of the above objects seem to be correct to me.



          It's just a hunch but perhaps you created the Deployment first and then the ClusterRole and/or ClusterBindingRole and/or the ServiceAccount itself. Make sure you have these 3 first, then delete the current heapster Pods (or the Deployment, and wait for the Pod to terminate before recreating the Deployment).



          (Create the ServiceAccount by kubectl create sa heapster -n kube-system)



          Also, you can test if ServiceAccount can list the events by:



          kubectl get ev --all-namespaces --as system:serviceaccount:kube-system:heapster





          share|improve this answer

























          • That is a very useful command to know. But no luck, I get the same message from this command as appears in the log. > kubectl get ev --all-namespaces --as system:serviceaccount:kube-system:heapster Error from server (Forbidden): events is forbidden: User "system:serviceaccount:kube-system:heapster" cannot list events at the cluster scope

            – Gudlaugur Egilsson
            Mar 26 at 6:44












          • The interesting thing is that I have tested that role & binding with the kubectl command quoted and it works for me! Can you kubectl version please? I want to get to the bottom of this, of I can

            – Janos Lenart
            Mar 26 at 7:15












          • Server v1.10.2 and client v1.10.11.

            – Gudlaugur Egilsson
            Mar 26 at 16:06













          1












          1








          1







          All of the above objects seem to be correct to me.



          It's just a hunch but perhaps you created the Deployment first and then the ClusterRole and/or ClusterBindingRole and/or the ServiceAccount itself. Make sure you have these 3 first, then delete the current heapster Pods (or the Deployment, and wait for the Pod to terminate before recreating the Deployment).



          (Create the ServiceAccount by kubectl create sa heapster -n kube-system)



          Also, you can test if ServiceAccount can list the events by:



          kubectl get ev --all-namespaces --as system:serviceaccount:kube-system:heapster





          share|improve this answer















          All of the above objects seem to be correct to me.



          It's just a hunch but perhaps you created the Deployment first and then the ClusterRole and/or ClusterBindingRole and/or the ServiceAccount itself. Make sure you have these 3 first, then delete the current heapster Pods (or the Deployment, and wait for the Pod to terminate before recreating the Deployment).



          (Create the ServiceAccount by kubectl create sa heapster -n kube-system)



          Also, you can test if ServiceAccount can list the events by:



          kubectl get ev --all-namespaces --as system:serviceaccount:kube-system:heapster






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 25 at 16:20

























          answered Mar 25 at 16:10









          Janos LenartJanos Lenart

          11.3k2 gold badges35 silver badges49 bronze badges




          11.3k2 gold badges35 silver badges49 bronze badges












          • That is a very useful command to know. But no luck, I get the same message from this command as appears in the log. > kubectl get ev --all-namespaces --as system:serviceaccount:kube-system:heapster Error from server (Forbidden): events is forbidden: User "system:serviceaccount:kube-system:heapster" cannot list events at the cluster scope

            – Gudlaugur Egilsson
            Mar 26 at 6:44












          • The interesting thing is that I have tested that role & binding with the kubectl command quoted and it works for me! Can you kubectl version please? I want to get to the bottom of this, of I can

            – Janos Lenart
            Mar 26 at 7:15












          • Server v1.10.2 and client v1.10.11.

            – Gudlaugur Egilsson
            Mar 26 at 16:06

















          • That is a very useful command to know. But no luck, I get the same message from this command as appears in the log. > kubectl get ev --all-namespaces --as system:serviceaccount:kube-system:heapster Error from server (Forbidden): events is forbidden: User "system:serviceaccount:kube-system:heapster" cannot list events at the cluster scope

            – Gudlaugur Egilsson
            Mar 26 at 6:44












          • The interesting thing is that I have tested that role & binding with the kubectl command quoted and it works for me! Can you kubectl version please? I want to get to the bottom of this, of I can

            – Janos Lenart
            Mar 26 at 7:15












          • Server v1.10.2 and client v1.10.11.

            – Gudlaugur Egilsson
            Mar 26 at 16:06
















          That is a very useful command to know. But no luck, I get the same message from this command as appears in the log. > kubectl get ev --all-namespaces --as system:serviceaccount:kube-system:heapster Error from server (Forbidden): events is forbidden: User "system:serviceaccount:kube-system:heapster" cannot list events at the cluster scope

          – Gudlaugur Egilsson
          Mar 26 at 6:44






          That is a very useful command to know. But no luck, I get the same message from this command as appears in the log. > kubectl get ev --all-namespaces --as system:serviceaccount:kube-system:heapster Error from server (Forbidden): events is forbidden: User "system:serviceaccount:kube-system:heapster" cannot list events at the cluster scope

          – Gudlaugur Egilsson
          Mar 26 at 6:44














          The interesting thing is that I have tested that role & binding with the kubectl command quoted and it works for me! Can you kubectl version please? I want to get to the bottom of this, of I can

          – Janos Lenart
          Mar 26 at 7:15






          The interesting thing is that I have tested that role & binding with the kubectl command quoted and it works for me! Can you kubectl version please? I want to get to the bottom of this, of I can

          – Janos Lenart
          Mar 26 at 7:15














          Server v1.10.2 and client v1.10.11.

          – Gudlaugur Egilsson
          Mar 26 at 16:06





          Server v1.10.2 and client v1.10.11.

          – Gudlaugur Egilsson
          Mar 26 at 16:06








          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55339863%2fnarrow-authorisation-to-list-cluster-scoped-events-in-kubernetes%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript