kontena / k8s-client

Ruby Kubernetes API client
Apache License 2.0
76 stars 26 forks source link

Kubeconfig loader does not accept expiry timestamps #102

Closed kke closed 5 years ago

kke commented 5 years ago

Ref: https://github.com/kontena/mortar/issues/93

If ~/.kube/config / KUBECONFIG contains timestamps, the loading will raise a Psych::DisallowedClass exception.

Example:

  user:
    auth-provider:
      config:
        access-token: 
        cmd-args: config config-helper --format=json
        cmd-path: /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/gcloud
        expiry: 2019-01-29T14:20:36Z
        expiry-key: '{.credential.token_expiry}'
        token-key: '{.credential.access_token}'
      name: gcp

Time/Date/DateTime should probably be whitelisted.