Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    May Pongpitpitak
    @mayppong
    Hey @obmarg, I saw you tagged my issue with milestone 0.6.0. Do you have a date plan for it?
    I'm hoping to put kazan into production as soon as I can, and would prefer to use yours from hex rather than from my own version from GitHub.
    Graeme Coupar
    @obmarg
    Hey. I don’t really have a date planned - as soon as I can. Figured it’d be good if in_cluster auth worked before releasing, hence the milestone tag.
    May Pongpitpitak
    @mayppong
    I'll try to fix the formatter as soon as I can so you can start the review process. Hopefully that helps
    Graeme Coupar
    @obmarg
    Ah yeah, I hadn’t noticed your PR
    I’ll take a look just now
    May Pongpitpitak
    @mayppong
    In any case, I think I've resolved the conflict and reformat the code. It's just running the check now
    Graeme Coupar
    @obmarg
    Sweet. Well in that case I’ll probably release 0.6.0 tonight or tomorrow.
    May Pongpitpitak
    @mayppong
    Hmm I think something got deleted while I was doing the conflict resolution.
    I'm trying to figure out why there was even a conflict when I was pushing a new commit
    Graeme Coupar
    @obmarg
    Hmm. Yeah, that is pretty odd.
    May Pongpitpitak
    @mayppong
    In any case, it looks like while I was resolving conflict, I didn't remove the extra function def line where the signature got changed. Hopefully this works
    Yes! All green
    May Pongpitpitak
    @mayppong
    I'm getting this message
    iex(ephemeral@127.0.0.1)6> {:ok, configmap} = Kazan.run(configmap)
    ** (MatchError) no match of right hand side value: {:error, {:http_error, 400, %{"apiVersion" => "v1", "code" => 400, "kind" => "Status", "message" => "ConfigMap in version \"v1\" cannot be handled as a ConfigMap: v1.ConfigMap: Data: ReadString: expects \" or n, parsing 106 ...
    Does the data field need to be json encoded before passing to Kazan functions for configmap?
    Please help :)
    Graeme Coupar
    @obmarg
    I'm not sure - that error message certainly suggests so. How are you constructing the configmap that you're passing to run?
    Graeme Coupar
    @obmarg
    @mayppong I've been able to submit a configmap without json encoding the data field:
    %Core.ConfigMap{
      data: %{test: "something"}, 
      metadata: %ObjectMeta{generate_name: "test"}
    }
    |> Core.create_namespaced_config_map!("test") 
    |> Kazan.run!
    
    %Kazan.Apis.Core.V1.ConfigMap{
      api_version: "v1",
      data: %{"test" => "something"},
      kind: "ConfigMap",
      metadata: %Kazan.Models.Apimachinery.Meta.V1.ObjectMeta{
        annotations: nil,
        cluster_name: nil,
        creation_timestamp: "2018-02-20T01:23:19Z",
        deletion_grace_period_seconds: nil,
        deletion_timestamp: nil,
        finalizers: nil,
        generate_name: "test",
        generation: nil,
        initializers: nil,
        labels: nil,
        name: "test8tbn5",
        namespace: "test",
        owner_references: nil,
        resource_version: "16145",
        self_link: "/api/v1/namespaces/test/configmaps/test8tbn5",
        uid: "a28c036c-15dc-11e8-a477-0800273edc08"
      }
    }
    May Pongpitpitak
    @mayppong
    OMG, why did I just received a notification email now. I super busy this week/weekend but I will try this out again next week!
    Andre Nathan
    @andrenth
    Hi
    Is kazan updated for v1.10 of the k8s api?
    Graeme Coupar
    @obmarg
    Hi @andrenth - the latest version of Kazan is not updated for 1.10 yet. Its pretty easy to do but I’ve not got round to it yet. It should still work with 1.10, just won’t support any new features in it.
    Andre Nathan
    @andrenth
    @obmarg Thanks
    Zach Norris
    @znorris
    I'm trying out kazan for the first time and I'm having an auth issue. I'm using .from_kubeconfig() which generates a Kazan.Server{} where auth: nil (not sure if that's relevant). I'm using gcloud sdk to configure kubectl.
    The error is a 403 "unknown user 'system:anonymous'". Any thoughts on what I might be doing wrong?
    Graeme Coupar
    @obmarg
    @znorris is this with GKE? The master branch doesn’t currently support the auth method that gcloud uses for GKE. There is an in progress PR to add this though, so you could use that fork in the meantime: obmarg/kazan#48
    Though think I’m going to put aside some time to finish that PR today
    Zach Norris
    @znorris
    @obmarg yes, that's with GKE.
    Graeme Coupar
    @obmarg
    @znorris cool. I finished off the above PR today, so master should support GKE authentication now. Will be releasing to hex in the next couple of days
    Though let me know if you still run into problems, I don’t have access to a GKE cluster to test with
    Zach Norris
    @znorris
    @obmarg Awesome, I'll give it a test and let you know if I run into anything. Thanks :+1:
    Zach Norris
    @znorris
    @obmarg I think there's something wrong but I'm really just getting started in Elixir. After using .resolve_auth I get a struct with the token. But I'm not matching this case https://github.com/obmarg/kazan/blob/master/lib/kazan/client/imp.ex#L40
    Instead I get the case below it, "Provider authentication needs ..."
    Graeme Coupar
    @obmarg
    Hmm, that’s odd. Can you share a gist or something?
    Zach Norris
    @znorris
    Sure thing. I'll post the struct and the code snippet.
    Graeme Coupar
    @obmarg
    Cool, thanks. Definitely my fault - will push a fix up in a couple of minutes
    Zach Norris
    @znorris
    Thanks for looking into it so quickly!
    Graeme Coupar
    @obmarg
    Latest master has hopefully fixed that
    Zach Norris
    @znorris
    That did the trick! Thanks again. I'm pretty excited to start using elixir for custom Kubernetes development.
    rodesousa
    @rodesousa

    Hi,

    i would like use your lib but i dont understand one thing in Kazan.Watcher part.

     Start a watcher using the request, and passing the initial resource version and a pid to which to send received messages.
    
    Kazan.Watcher.start_link(request, resource_version: rv, send_to: self())
    
    ...
    
    resource_version - The version from which to start watching.

    I don't understand what is resource version ?

    Do you have a example of an watcher ?

    Graeme Coupar
    @obmarg
    Hi @rodesousa - the resource version lets kubernetes know what version of the resource you last saw.
    For example if you got on a pod while it was at resource version 1, then changed that pod and did a watch with resource version 1, you should see an event for your change come through