About this video
What You'll Learn
- Swap kubectl's verb-noun interface into noun-verb commands using a simple Bash plugin.
- Make the plugin executable, place it on PATH, and test it locally.
- Package the plugin for Krew with a manifest and GitHub release workflow.
Matt Turner joins to write a kubectl plugin in Bash that swaps kubectl's verb-noun ordering to noun-verb, then packages it for distribution through the Krew plugin manager with a crew.yaml manifest and GitHub releases.
Jump to a chapter
- 0:00 Holding screen
- 0:50 Introductions
- 0:57 Introduction and Guest
- 2:00 Context: Why is Kubernetes wrong
- 2:20 The Problem: `kubectl` Verb-Noun Ordering
- 4:30 Demonstrating the Problem
- 6:20 What is a kubectl plugin?
- 6:30 `kubectl` Plugin Mechanism Explained
- 8:00 Building a Basic Bash Plugin ("Hello World")
- 9:09 Making the Plugin Executable & Adding to Path
- 10:30 Testing the Basic Plugin
- 11:45 Implementing Verb-Noun Swap Logic (Initial attempt)
- 14:30 Testing the Verb-Noun Swap (Local bash run)
- 18:00 Discussing Plugin Limitations and Edge Cases
- 24:20 Introducing Crew Plugin Manager
- 26:20 Creating the Crew Manifest (`crew.yaml`)
- 32:00 Publishing our plugin with Krew
- 32:30 Preparing Git Repository for Crew Publishing (First release setup)
- 40:40 Attempting Local Installation via Crew (First try with manifest)
- 42:00 Debugging Crew Manifest and Installation Issues (alpha 2, 3, 4 attempts)
- 54:50 Debugging Argument Handling in Crew Context (alpha 5, 6, 7 attempts)
- 1:17:40 Successful Local Installation and Testing via Crew
- 1:18:30 Discussing Crew Index Publishing & Future Work
- 1:19:50 Conclusion
Full transcript
Generated from the English captions. Timestamps jump the player to that moment.
Read the full transcript
0:57 Introduction and Guest
0:57 Hello. And welcome to another episode of Rawkode live. I am your host Rawkode. Today, we're going to try and write a kubectl plugin to rectify a very major wrongdoing in the Kubernetes ecosystem. We will talk a little bit about that in just a moment. First, I want to introduce my friend and host for today, our co host, I guess, Matt. Hey, How's it going? Hey. Not bad. Thanks. Not bad. Awesome. Do you wanna give us the quick elevator pitch, who you are, what you do, and why you're here? Sure. Pitch means I'm selling something. I don't know
1:30 why I'm selling. I'd only start these with used to be a software engineer. But you're about to see my code, so I'm probably not gonna say that. I I used to be a software engineer. Yeah. No. I'm Matt. I I guess I do DevOps and Kubernetes stuff. I used to be a software engineer, then I got into the whole containers and cloud and Kubernetes thing. I had a bit of a fascination with Istio for a couple years. Yeah. Just kinda hang around. I've worked a bit like big big companies and small, and and my last role was
2:00 Context: Why is Kubernetes wrong
2:00 head of platform running a team to build a, you know, your your classic cloud native platform for a for a fintech company. Nice. Well, I think, I mean, we've known each other a while now. Probably, I think it was true, the Kubernetes community. I think, know, it's safe to say we're both well versed. We use it almost daily, if not every day, many times a day. And I think we decided to patch this episode or talk about this episode just for me ranting on Twitter about the verb and known ordering of the cube control command. And I I if I
2:20 The Problem: `kubectl` Verb-Noun Ordering
2:31 remember correctly, you had an agreement with me. Right? Like, we we were both firmly in the camp that it's wrong. I think we were both firmly in the camp that it's wrong. And then I started saying all of these things. Oh, you know, when I was a young thing, when I was at some some gray beard taught me from software engineer. Right? If you're gonna name a method because I started off doing embedded c, and there's no classes or anything. Right? So you end up with sort of these these massive long function names like it's basically package underscore component underscore
3:02 something underscore something. And there was this perennial argument, and Graybeard put his foot down in that first place and said, no. It's noun noun noun noun verb. Because you might have a bunch of nouns. You might be in a in a hierarchy that you'd use packages and classes for in another language. You know, you might have a a tree you might be in a tree iterator. Both of those are nouns, but then at the end, it's like get, set, delete, create. You know? So that's that's your verb. So I think I said, yeah, kubectl should be maybe I'm jumping ahead, but I
3:28 think we both we both agreed it was wrong. We both had different ideas for what write looked like. Yeah. So for me, I mean, again, I spent a lot of time in my command line. I'm gonna assume that people working with Kubernetes generally are anyway. You know, we are using kubectl and helm and kind and all of these other other tools and I just always find it really frustrating that I have to do verb noun and then when I want to change or do something else with a noun and I got to delete twice and then
3:58 recompose my entire command and it just it doesn't have that flow, that ergonomics that I really want from a command line application. And we we seem to be in a situation where just all of the tools are now doing this, where it's kubectl get pods and then if you want to you know do something else with that pod, you have to, I guess we should show it, right? I'm never gonna be able to articulate it. Yeah, maybe we should. So let's see, let's do my screen share. So there's my my readme, we're starting from nothing today.
4:29 What am I doing? I have no idea. I do Type control. Get pods. I was faffing around with this cluster earlier, so there's some random resources here. But now if I want to do anything else with this, I have to delete two words. Yep. Change. And the ergonomics don't feel right. I mean, feel like I should be doing pods get pods to scrape and just really working with that flow. Your terminal's slightly off the bottom of the screen there by the way. It is for me. Just that line you're typing on. Alrighty. Let's see if I can change that. Yes,
4:30 Demonstrating the Problem
5:15 I can. So crop fell off. There. Now you just get everything. Yeah. Cool. Yes. I agree. I mean, yeah, you okay. You look at a deployment and then you're like, right. It's, you know, it's done its thing, but the why still my program still isn't running, so you go and change, you know, deployments to replica sets and then replica sets to pods, maybe. But, yeah, more often I end up listing pods, describing a pod, doing get dash o YAML on a pod. Even things like logs, you wanna look at the logs. You know? I mean, yes, there's
5:47 there's obviously solutions to all of this. You know? Z Shell's got some some nice crazy syntax involving a lot of exclamation marks where you can go and change. But, you know, other words in a in a previous command, and you could learn all of your read line stuff to, like, navigate around those words. But it's not what was that really good talk by Rich? Whatever his name is. You know, simple is not easy. Like, it's it's possible, and if it's in your muscle memory, then it's easy. But it's not simple, it's not intuitive, it's not discoverable, it's not the same as the
6:13 other tools that you use. Yeah. Definitely. So I think we've explained, we've set the we've set the challenge, right? We've explained why we don't like the way it works right now. And Kubernetes are particularly kube control does provide ways for us to extend the command. It has this concept of a plugin, very similar to the way that get plugins work. You can find this documentation on the Kubernetes website. And if you're not familiar with how get plugins work, all you really need to do is have another command available on in your path that starts with kubectl dash forget is
6:30 `kubectl` Plugin Mechanism Explained
6:52 get dash. And anything after that then becomes a new sub command and the kubectl command and it executes it. Nice and simple. So we're gonna just really start with the most crudest approach that think we're gonna that we can get away with here and that's just use a little bit of bash. I guess we'll start with the developer friendly hello world equivalent and then we'll see if we can actually try and fulfill the verb and noun swap page. And then we also want to take a look at using crew as a way to provide a crew as a plug in manager for
7:25 control that would make it easier for other people to install this plug in and get the benefits of this. Easy. Right? Easy. I mean, there's no it's no CNI. There's no as you say, we can just dump a binary on the path. We don't have to implement a gRPC interface over loop back. Nobody's gonna fork exec us with some, like, great crazy, you know, crazy set of arguments. Like, I yeah. It could be. I tried to extend I was trying to extend the scheduler last week, and I'm thankful for this interface, me tell you. Alright. Okay. Good.
7:59 Let's just get started. You just go down this page, there is this really nice, not nice, a very simple example for bash that we're just gonna Oh, cheers. Cheers, Tim Hawken. That's done. We're just gonna steal this. We're gonna start with a fail. And then we have a live share here, which means that I should call this kubectl. We'll call it pods for now. And you should be able to see this, right? Because the live share and can you type? Give me a give me something. 42. There we go. Right. Perfect. Mhmm. Now don't delete it. Oh, I didn't.
8:00 Building a Basic Bash Plugin ("Hello World")
8:41 What the hell? Yeah. Sorry. Not off to a good start. Right. So, no, I I I really don't care about argument handling right now. I I really just want to show how simple it is to get started. So we just say, hey, I'm a plugin named kubectl pods, we save the script. Now because this is the bash script, we do need to make it executable. Yeah. I'm just gonna symlink this directly into my path. I was gonna say. And this is where I show my my twenty years of Linux knowledge and still can't remember if it's a target.
9:09 Making the Plugin Executable & Adding to Path
9:26 It's source first. Source first. Yeah. It's source first. I should put a path on it. So user local. Means I should now have access. Oh, it does not. No. Try it. You might need hash dash r just to make your shell realize. Oh, wrong one. Oh, no. Because it's got a dot s h on it. Okay. So. This is the wrong way around. Is it? Did I get it wrong? Oh, no. Oh, no. I need the fill path. Okay. So. You you need to I didn't think you did. I almost said something. Yeah. I thought it would work it out. Okay.
10:06 So, let's do this. And we actually want to make it available just as pods. Alright. Let's see how's that looking. We might need a should bang line to make it execute properly. Oh, yeah, of course. We have one. Oh, we do have one. We have bad one. So, user ben env bash. Okay. Now we have a bearish event. Cool. If we run kubectl Should be should be done then. Pods. Which means, because this is all really simple. Mhmm. We now can have we now have a new subcommand on. Done. Alright. Thanks. See you later. I honestly I thought we'd be
10:30 Testing the Basic Plugin
10:42 fighting go dot mod files for like an hour. Like this is really cool. I mean, think we're gonna be able to get quite far with our really crude bash version of this and well actually not because we're trying to here's a challenge, We're gonna need a different one of these bash scripts for each of the nouns that we want to be able to drop in as a sub command because we don't have that encapsulation of a sub command. Oh, hadn't thought of that. But we'll make it work for for pods and maybe deployments and then
11:13 hopefully people will give us some pull request with other with other names because I don't know. Could we make our lives a bit easier and just just call our plug in like foo and then you you could literally shell alias like kubectl to kubectl foo. That's a good idea. Or maybe we'll have a I'm assuming we can just drop in as many of these batch scripts as we want. So we can have Oh, nice. Deployment replica sets and then have an encapsulator code through that people can use as an alias, maybe. Anyway, one one problem at a time, Matt. Alright.
11:44 Yeah. Fair. Good point. Good point. So as far as our crude implementation goes, all we really wanna be able to do is is execute something pods that. Alright? Where Yeah. Get pods. So, I mean, I don't wanna sound too confident, but that oh, no. No. Get yeah. Get pods. Okay. But how do I know I want to get? So, actually, this goes here. So, I'm trying to find a tweet where I sort of suggested this grammar. Like, I can't. But I think it was something like we we were changing the noun and verbal audition. It was something like pods get
11:45 Implementing Verb-Noun Swap Logic (Initial attempt)
12:24 name and then the arguments. And I think I suggested, you know, as a as a bonus, you could leave more and more of those latter parts off. So, you know, QPCT or pods would would do a list essentially, like a like a get. Yeah. You propose bringing the names based into the into the mix as well. We talked about providing defaults if you're got the cube counter. But right now, let's let's assume that we wanna be able to run cube control pods get dash a. Right? So we wanna do all namespace. Yeah. So what we really want is to
12:59 take the first parameter and that's I don't think this is the right bash syntax. This is I've made this up. No, that's that yeah, that's not. I was I I think there's something like that, like where you say, maybe that's just my ghost slipping through, like, hey, it's gonna be the rest of the slice that's after the first So let's try and get that to work then. Yeah. Some something yeah. I agree. That'll swap. Because I mean, don't wanna be writing a parser in bash. No. So let's see. Let's clutch it for now. Bash array syntax. So
13:30 the the old fact the correct way to do it old fashioned was shift. But, yeah, bash four, bash five, you've probably got some nice erase syntax. Yeah. Let's see. What have we got? Well, we can definitely do it. We we should probably do it with shift and stuff. Do you wanna look at that? I'll knock up, like, s h compatible something in case we need it. Yeah. Okay. So what you're suggesting is we actually say command equals and we're gonna shift this and then extra or else. Yeah. Basically. Okay. Yeah. You know that. Yeah. Yeah. So
14:05 I I don't even remember the right syntax here, but I'm gonna work it out. So Yeah. It's not quite shift. It'll be command equals one and then shift does its own command, basically. Shift just pops pops that queue. I don't think you need an argument to shift. I think shift literally just punch all the positional arguments by one. Oh, really? There we go. Yeah. I think so. You think And then you can use and then and then you can use app for it. Yeah. You know what? How do we test it? Well, we run it in production. So let's see.
14:30 Testing the Verb-Noun Swap (Local bash run)
14:38 Pause. Get. Oh. Come on. Yeah. We're done. I mean We're done. We're done. We're literally done. Should we default so I think we can say if one isn't provided, I need to default to get. What are you typing? Do I have to save in Versus Code? Oh, so you wanna be able to run just a key I think literally just pods. Yeah. Yeah. Okay. I like it. But I could also do pods describe and then pass n one and that should still work. So good. I'm already loving this plugin. I've got this I'm actually yeah. This is so I've got about
15:34 three pages worth of shell aliases. I've I've got a bash RC snippet. It's just got so much. Like I've got bash functions that auto generate like shell aliases. Like that's that's how much I use Kube CTL. And this is already better. I'm I'm pretty hungry. Right. So now we can try and show off the workflow that we actually want. We're like, hey, well I just wanna be able to push up and I wanted to scrape this resource. Like and I'm not deleting any words to be able to do this. That's awesome. I mean, I didn't think we would get
16:06 this far in an hour and a half and we've done it. Did we say what so so what is the workflow then? What's the sort of what's the key user journey through this? Because I often find that I I'll get them and I'll end up describing one like that. And then the next thing I'll probably end up doing is like a get dash o yaml. Yeah, so generally you're right. So what I I think I'm just gonna repeat exactly what you said but I I do a lot of pods alright, okay. Oops. And I said okay, what's what's wrong with
16:39 this pod and then if there's nothing here then I would say okay, well I actually let's get NGINX one, it's not copied to my buffer anymore. Let's see if we can find a bash way to handle that. And then dash o. Yeah. So the get isn't a default anymore either because engine Right. Because yeah. But still, I still like where this is going, so. Yeah. No. No. Definitely. I just wonder whether without verb really does wanna go on the end because I think that's what I suggested because I was like, noun noun noun. Because I think
17:16 I I think I suggested QCTR namespace name verb. No. I'm not saying that's what like, thinking about it, I don't I think the namespace should still just be a flag, and that's maybe not the most but what that would let you do is go back up and literally just just change the verb. So we're like, oh, yeah. That one, it's broken. It's wedged. You know? Delete. Because there, I often just use delete just to cycle. I push a new image in another terminal from the code I'm writing and then do a delete. Yeah. So, what you're proposing is where we would actually
17:46 quite like the syntax where we have this and we say describe and when that goes together what we want, we say okay, let's get the logs or maybe we want more information and but then I think we're in a situation where we need to be able to understand when this is a verb and when it's when when it's a target. Right? Because we still wanna be able to do pods get or do we? Well, I think if we just think if we just say pods, well, pods get will just work because you can just say pods. And do we ever wanna just
18:00 Discussing Plugin Limitations and Edge Cases
18:20 do pods deletes for all of them? We probably don't. Pods create, edit, it doesn't make sense. But what if I wanna do a label selector where it's get me all of the pods where app equals nginx, which right now Two. Well, NGINX one, I think I've got it called. Well, that would work, but that's no long, I mean, if we inject some pod name here, we lose the ability to do that. So as much as I like your idea of having that fluid interface where we do have the name followed by some command to an act on a target,
18:58 being able to understand when we actually need to escape out for that, I think would be quite a challenge. Unless we unless we allow lists some specific commands like get or etcetera. Right. Yeah. I was thinking the name would always be there but you're right that like label selectors are are very often used as a stand in for a name on there. Yeah. And that does make it very I'd have to wrap my brain for far too much like you do computer science for whether this grammar's ambiguous or not. And we don't really were running a parser in
19:26 Bash anyway. Yeah. Okay. No. Let's stick with this. I'm really I'm I'm pretty happy. Well, let me let me double advocate myself here. What if we check for the dash? What if we check for flags? And that means that we're working on no name basis and anything else we would assume is a name. Yeah. Would there ever be a reason to type anything after pods that's not a name that isn't a flag? Mean what what do you do with a list? Do you watch? You list dash w dash l like maybe we're okay? Yeah. There's no it doesn't take any other,
20:06 you know, non flag arguments, does it? It doesn't take any other I forgot what Python calls them. Other than the command and the name. Let's try it. Let's try it. Let's try and make this work. So what we wanna see now and let me just sort of quote this out a little bit is before we go shifting and getting a command, we wanna establish is the first parameter a flag. If so, then what we're gonna say is that something. Otherwise, it's a Yeah. If it's a flag, I guess. Now I'm trying to work out, do we
20:58 ever need to send flags to anything that's not a get because what we're saying is we are gonna assume that it's all worth a get. What if we wanna delete? I don't think we do need to assume because if we're rearranging them then you can just put the verb on me. The get just goes on the end. But if we no. But if I wanna delete all pods right now, then it would be pods delete all. We would assume this is the name of a pod. Does that work? Yeah. Is the capital a not all namespaces?
21:30 Need you need to say it's all, isn't it? It's literally pods delete. But which is a flag? But the delete becomes before the flags. Are are you are we now suggesting that, hey, actually what we want to do is all delete? Yeah. It's not the most ergonomic thing, is it? Who does I think that write in the the cube control wrongs be so complicated. So Maybe the guys who wrote it, the people who wrote it knew what they were doing. Maybe it should just be delete. Right. No. That's I'm I'm not gonna not sticking with that. Should we maybe just try
22:07 and do this for GET? Because I I mean, I do not delete all pods that off. I think I'm happy if this thing gives me some shortcuts. I I I'm happy if this does not completely replace Kube CTL, you see what I mean. If it's useful shortcuts, and then if this doesn't cover it, as long as it doesn't do the wrong thing, as long as it doesn't do anything dangerous, it just goes, I don't know what that is. Then I just go back to Kube CTL. I don't know what you think. I think I'd be happy with that.
22:33 Okay. Well, let's just make sure that we have, you know, the target workflow that we started with. Make sure that works. That's, I mean, that to me is all that's important. Is this is the ability to do pods, delete, get, describe and I really wanna make logs work here too. Okay. So even though I know you can get logs of other resources. Does that work at the moment? So it works with what we've Maybe we actually should. Well, okay. You're right. Okay. So, pods. Just gonna Okay. Because we went in a rabbit hole where we're like, oh, but the
23:11 name should come before so that I only need to then do up Yeah. Delete. The the way it is, it actually works very nicely. You're so annoying. Anyway, right. That way it was me that suggested the rabbit hole, actually I'm like, what we've got what we've got works. Yeah. So now if I wanna change this to be logs, I am going back before this target. Yeah. That's what I mean. What if mean So we could swap. The problem with swapping them is the yeah. Sometimes you don't wanna give a name, sometimes you wanna give flags. I mean, we
23:48 can always just encourage. Well, I can never remember that syntax, but yeah, sure. I I got something wrong, something like that though. But then that would work if I was using the original syntax. Right? So like, we still wanna identify something cool about this interface. So I I know why we tried to put the command after the thing, but it's gonna be tricky. So this is this is speed one. Right? We're just having a bit of Yeah. This is okay. Maybe we try to extend this to deployments and stuff and then maybe we try and
24:20 Introducing Crew Plugin Manager
24:22 get it up in crew. Maybe that's what we should look at first. Because once we got the framework, I mean, somebody could come along and I mean, we shouldn't be leaving this in bash. Right? We probably should write it in a real language. Why? Yeah. Maybe we we maybe At which point, we lean on a library. At which point, we literally lean on, like, a a parser library. Right? We we yak or whatever the equivalent is for Go. Okay. So, there's something we've not tackled. KP get won't work anymore. So it gives them like, because remember all the resources have aliases like
25:02 pods Oh, they do, don't you? Most of them, yeah. Deploy, deploys, deployment. Yeah. Is that not gonna Well, we would to make sure. Yeah. Maybe we should jump to crew now. Maybe crew provides some facility for them injecting this with multiple names. I'm not sure. I've never done this before either. So Yeah. Okay. But if we can have to say, take this fail and stick it in the path as kubectl pods, kubectl po, kubectl whatever. Yeah. Either crew just just literally dumps out multiple siblings or maybe even kubectl has a a metadata file. Like, they can find a
25:40 JSON file on the same path that tells the aliases or something. Alright. So let's Okay. Work out what crew is. Yeah. I assumed it did more, but maybe it doesn't. So discover plugins, install them on your machine and keep them up to date. So the better no, that'll be for developing crew itself. No, distributing plugin. Okay. Plugin naming game, best practices, we can skip all that. Best practices is not for us. No. Okay. So, shall we just jump straight to the manifest? See what this is. Okay. Right. Okay. So you do give it a manifest.
26:20 Creating the Crew Manifest (`crew.yaml`)
26:33 Of course, it's of course, it's Kubernetes style API. Of course. So let's call this crew. Oh, hates me today. Rename crew dot yaml. Alright. So crew Google container tools, plugin. The name must match the file name of the manifest. Right? So we call this the noun verb plugin. Which means I need to rename my file. Mhmm. To be known verb. Thank you comment. Version. Yep. Zero zero one seems about right. Maybe that's too mature. Alpha one. Alpha. Yep. Homepage. Sure. Why not? Rawkode, cube control, and verb. Description, bringing sanity and composable composability to keep control.
27:59 I mean, don't wanna offer too much but I feel that we are I was gonna say important mission. Aspirational. Let's see if I can learn to spell. Maybe that's just not a word. As as for today. Maybe you can't compose compose that stem and suffix. Bring insanity and compose. I like it. Like that we've composed a fake word. Yeah. Yeah. I think it's like I like the irony, we should keep it. Alright description. Thanks. Not gonna worry about that. Okay. The platforms should work on anything that's portable POSIX compatible bash scripts. See? Exactly. Yeah. Go with requires to compare this multiple
28:41 times. Now we are We're even using user user bin m. Mean, we're Yeah. Safe. We'll even work on next, which is good. Yeah. URI. Oh, we haven't really Okay. So they're using GitHub. Yeah. They're using GitHub releases. That's fair enough. And there we go. We have the ability to deploy the fails. Oh, we we could have used that. Yeah. Dot slash. I wonder where it's I assume it prefixes that path. A bin specifies the path of plug in executable. Oh, amongst alt right. Oh. So I think what it's doing is I think those are passed within,
29:22 like, a sandbox, and then that bin key at the bottom is telling it which one to symlink into user local. Does that mean we need a manifest for every sub command? It doesn't look like it. Well, I mean, that's not gonna work. No. It's So we would have to provide the cube control known plug in, which then you'd have to alias cube control known to cube control. We we probably would have to go down that encapsulated route to provide this. That's all I can think of at the moment. The problem with that is it then needs to cover the
30:01 full surface area of cube control. It can't just be shortcuts unless it just unless we write the, quote, unquote, parser fairly well so that it just like, if it doesn't recognize the sequence, it bails out and it calls underlying cube control with exactly the set of arguments you've given it. Well, I I think it I I don't think we need a parser. I mean, all we're doing is swapping the first argument around. I mean, we we would have to inject something in here. So like, it would be That's why it's yeah. So that's why it's quote unquote parser. Quote
30:35 unquote parser. Okay. I'm just thinking if you alias kubectl two, kubectl noun verb, kubectl noun verb then has to understand everything you could ever possibly pass to kubectl. Right? Either understand it or realize that it doesn't understand it and call the underlying one. I mean, the only constraint on people using this program would be that you no longer could put your name as base in the start. You would have to always do pods get and then do flags so that it can swap these two around. But there's other weird stuff on there's like QCTL API resources. Right? And
31:07 all of these other weird little commands that you forget. Exec and all of that stuff that don't follow this because they're not CRUD operations. There's all there's all the basically, the RPC methods. Yeah. It's getting more complicated than I was hoping for, wasn't it? So I've got, I've got k. I use KubeCTL so much. I've got k alias to KubeCTL. Maybe we just alias k or KNV to KubeCTL noun verb. And then that's your set of shortcuts right on your fingertips. Well, yeah. Okay. So this is a bit of fun to understand how crew works anyway. Right? I
31:50 mean, we're not actually trying to to solve this problem. I mean, I do wanna make my life a little bit easier. So You might not be. Yeah. No. I'm getting I'm getting carried away. Should we just fork cube control and just fix it? Okay. What what should we learn next? Okay. Maybe it just does pods for now. Should we should we try to publish it? Let's just publish it and see if we can install it through crew. That would be really cool. I'll I'll try to install it over here. Yeah. That'd be really cool. Okay. Let's do that.
32:00 Publishing our plugin with Krew
32:20 So this is just our pods helper, we don't need to solve anything else. We can, you know if we're feeling nice, we'll add deployments services. The basic ones, right? Nobody won't handle any CRDs, custom resources or special commands. So, that means we have our noun verb here. So I'm I'm gonna have to push this to get hub. So we need a repository, we need a release, so we need a tag and then we'll need to fill in these values. So, like all good new projects, get in it. I thought that was the default now. Get
32:30 Preparing Git Repository for Crew Publishing (First release setup)
32:55 in it. There it is. What did it say? Oh, no. I have to set config global init. Alright. You just get it's global config. Okay. Get init. There we go. And get at our readme, which has nothing, and our alias, our sub command. Let's get that pushed up first and tag it. So, feat fixing the pod insanity. I'm loving the hyperbole with this episode. I've got It's great, isn't it? Keep con keynote right here. We fixed it. We saved you. All we saved everybody a hundred thousand keystrokes a year. Exactly. Right. And you're positive. What's that? Oh, is
33:46 that just the theme selector? I thought it was a new feature. Okay. Cube CTL noun verb. I'm hoping there's something in the crew syntax where we can deploy multiple plugins in a single, but if not, I'll be able to plug later. So this is gonna be public, you don't wanna know, and go. Let's copy this. PERSH origin main. Yeah. Fingerprint. Now we wanna tag this. 0Dot0Dot1AlphaAlpha1. It's hyperbole and then it's straight up fraud, which would be calling this a v one. Yeah. You're right. Push the tag and let's refresh this. So we should have new release.
34:57 I've never done a release before. Zero. Oh, yeah. No. It's cool. Yeah. You see that drop pick that from the drop down. And it should make it from the yeah. It should make it from that tag. Yeah. There you go. So on the left on the right is the release name. On the left is the the tag it's associated with. They just copy the length of this tarzip. Oh, yeah. I was thinking we would actually have to make that release artifact, but it's what we want is exactly just the zip content to that repo. Right?
35:30 Yeah. I wanted the shaft, so let's just download that. Curl FSSL. Yeah. Did anything come down? Nothing came down. TTZ. There we go. Yeah, what? I would learn how to set it just to Sha256. Sha 2 5 6. Yeah, exactly. I'm not But now I'm gonna learn how to work my Mac. Let's just see what gives me then. What is that? What does the man page say that is? 5.thirty. Print or check Shasms. Oh, so we can specify the algorithm default. We're getting one. Yeah. We don't want sha one here. Right? We want a 256 probably.
36:34 We want it to specified. Yeah. Did. Okay. Yeah. So DashA256. I'm just intrigued. I'm gonna look it up now. That looks better. Here we go. Oh, I've got a sha two five six on my Mac. I'm sure it's probably installed. Like I I took the winter break just to wipe this thing and like rebuild my dot file. All my dot files are up in Linux. I've been using Linux since I was 16 and this new role, they gave me a Mac and I've been I've been trying to make the best of it, shall we say.
37:05 I'm impressed you've stayed off because I yeah. I've been using Linux for about the same amount of time. I've got my I think we're about the same age. I got my dot files in in gits, right, on GitHub. It's all beautiful. And then, yeah, I've I've not been able to to resist the Macs for for so long. Companies keep giving me them. So many of my dot files are now full of if I was Darwin. Do something do something weird. Yep. Alright. Let's let's get this working. So we're almost there. Can feel it. So from
37:32 I'm assuming this plugin probably just has a directory unlike ours. Right? So let's just check that out. When in doubt, pull up the repo. There we go. I'm assuming they've got a directory called no, they don't. That's annoying. No. I think it's Well, this is fine, right? Because it's literally just gonna be in the I I assume they just extract the zip into the sandbox directory. Look at that. There's no bin file. It's just from star. Nice. Okay. I feel like we're onto a winner here. So Yeah. This might work. We might have to read the docs, but let's try it.
38:10 So fails from to. Why is not gonna be able to fix that? There we go. And we just want all Oh, so I think it's extracting it into this directory, isn't it? That's what's happening. Okay, so kubectl Oh yeah, okay. And verb star star dot, just describe the dot SH's and stick them into whatever the dot is and see if we can get away with it. Yeah. That may be enough. So I'm gonna I'm feeling brave so Just on git, I don't know, let's let's work it out. I wonder if our zip's got a prefix
38:58 in it the way GitHub makes it. We'll find out. So we're gonna add the crew manifest. We're gonna tag us as alpha two and we're gonna push everything and create a new release. Is there a way for me just to create releases from tags? Is that not something GitHub does? Not out of way. GitHub actions would be the way to set that up. Not out of the box. Okay. New alpha two target man pre release publish. So normally, obviously, you'd actually have to make those. It it zips up the sources those two like default assets and obviously you normally
39:40 actually have to do like a build step. Right? And kind of publish assets there. Yeah. But yeah, we get we get we get to win because we've just got just the interpreted code is what we want. I feel that we got quite lucky by just saying let's hack this together and the shell script instead of actually Yeah. Go because that was not the default. Yeah. It was. Yeah. I was like, we're gonna have to, you know, we're have to import all the client go packages, call it's KubeCTL packages, sorry, call it's internal API, you know, find it's
40:07 four kit, find it's parser, rip it out. And I was gonna spend all weekend like, preparing for this and then I was too busy. Here we are. I think we're we're on to a winner here. So we now have alpha two now. How do we tell crew about it? So let's Yeah. How do we actually publish this to their registry? And are they gonna let us? I mean Yeah. I mean, we maybe have to you we probably have to raise a PR on k slash k or something to be like acknowledged. Oh, I don't think it'll be KK shit.
40:37 I mean, well Maybe not KK. Testing plugin. Let's do local. Right? There we go. Yeah. Okay. I need okay. I don't even think I have do I have crew? No. So let's if if you got crew. It's Maybe install another or something. We're about to find out. Maybe install another plug in just to find out where it and then use which to find out where it puts it, so we can change ours as being actually sort of installed. Alright. Zero four o, that looks like a Kubernetes project, so. Yeah. I've got a few of these plugins,
40:40 Attempting Local Installation via Crew (First try with manifest)
41:16 so. Why is that not in my path? Let's see if it is if I do this. Is it a plugin itself? Or it is? Yeah, it is. Yeah, it is. And they go in Yeah, right. They go in home dot crew bin is where they all end up. In fact, it was right there in front of me. Alright. Okay. So install, point it to our manifest. Noun verb. And then he's just specified archive. Yeah, my guess. Oh, we got an error. Ben has to be set. That was not set on the other plugin. No. Which other plugin did you
42:00 Debugging Crew Manifest and Installation Issues (alpha 2, 3, 4 attempts)
42:13 find? Or was it? And it's just Is this a YAML schema thing? They're on our v one alpha one. We also Are you v one alpha one? I don't know. Because that that repo hadn't been touched for for three years. Yeah. Oh, David. Terrible given. Right. Fine. Fine. Fine. Fine. Alright. Let's see. They've added security. Matt and Dave work around security. Oh, look at that. There's an example patch one. Perfect. Oh, yeah. So they have this Ben. Should we should we get it working like that for now? We can always we can look at auto generating this stuff
43:09 or do you know, doing something Yeah. Was just curious if they document the field. Yeah. Okay. So each platform requires path to the plugin. You would specify this. It creates a symlink to that. I mean, Yes. Because we're trying selected as much. Be a bit more dangerous. Although, this is an array. Right? So Oh, it is. It wasn't. I I was gonna say that, but I swear it wasn't in that example we had. If it's an array, that's awesome. So we can see Yeah. Looking on my machine, there's yeah. I've got I've got a symlink farm and then I can see there's
43:48 basically a sandbox directory they all get extracted into. And it just wants the script, which for us, get to your pods. I mean, we can clean up that name and remove that. But for now, let's just do this. I'm gonna No. No. Let's just do that. Let's start something. I don't I don't wanna Yeah. Yeah. True. Okay. So that should make that happy. Not quite oh, yeah. It just wants this path. Okay. URI has to be set. Oh, no. Oh, so the Ben has to come in here. Okay. Got it. Got it. Got it. Got it.
44:53 Well, I broke it. Oh, no. Isn't it? Okay. So now we need to change it to skip the first two. Maybe. I don't know what it sees. I don't know how q c q c c l might strip one or both of them? That's a good question. Let's do two and then shift shift. I assume that's right. Alright. We could just just echo them. Force. If in doubt. I am I gonna have to uninstall it to reinstall it? I can tell you where it puts it. We could just replace the file. Or bum the version number, maybe.
45:41 Is that why it's not installing it? I didn't get a chance to read it. You might be right. This is alpha two anyway. Right? Yeah. Maybe I just can't say that. That's not gonna work. Alright. Where's the where does it stick that fail? It sticks it in dot crew store. Wait. A bin is this. So that's the symlink. The actual file is in store. Yeah. Store now verbs version. Alright. Okay. So copy. So hacky. This is a CD right here. Which means we wanna try oh, no. It worked. Alright. Okay. So That's sweet. We can skip noun verbs, which means
46:41 we know probably can add all the aliases for pods, POP deployments, etcetera. And then we probably what I'll do is I'll do alias key and equals cube control. I'm thinking that's how I'm gonna run it on my machine. I turned on this new Z Shell thing which does like expansion, which I'm really loving right now. Why did that not work? Why did that not work? Because that worked. Right? Oh, no. I've broken it. Yeah. What? Oh, noun verb, not noun verbs. Okay. So k n pods. Nice. Okay. We have changed the world today. Oh, so
47:40 you were talking you were typing k n and it did that? Yeah. So mine's auto expands. Right. Okay. I just didn't see So when I hit space? Do Very nice. L t t t. Yeah. Okay. That's nice. Oh, must have them configured not to auto spent. Yeah. I started I've been really working on my Z Shell plugins lately. That's really nice. Yeah. And if I do a key Cool. Pod six bands too. Right. Okay. We have a comment from someone. It must be really weird for anyone who's tuned in late. I'm really sorry, Alex. Because this is a bit of a wild
48:20 one. Yeah. Fuck it. We'll explain it again. Yeah. I mean, we've got description somewhere. Right? I I didn't add one because I had no idea how to describe what the hell we were trying to do. We're we're trying to fix a wrong in the world which is where you have to do pods and then delete two words and then describe your pods where we actually feel that it's more ergonomically correct or enjoyable to do pods, get, describe, etcetera. So we're trying to make that work for a plugin. And I've been really, know Matt has said, yes, we are trying
48:59 to fix this problem. But at the same time we're using it as an excuse a to catch up. No. No. Haven't. Because we've not seen each other in a while and this is the closest we're getting. And at the same time also we're learning how to keep control plugins work etcetera. So it's it's more of a just fun casual episode. Oh, we are. I keep trying to over engineer it and yeah, David keeps pulling me back. He's just been like, okay. Maybe I'll skip this one. Good call. Good call. Anyway, so we're in a position now where we
49:27 we have it working. Yeah. We've written this No, this is Crew manifest. You didn't let me cowboy it with v one alpha one. Right. But it probably worked out for the best because now we know we can actually specify this multiple times, which is a little weird because Oh, right. That's how you meant to do multi arch stuff if you need to ship two different binaries. Yeah. But we can probably just abuse that. Right? They can all say Linux. I think. Because now we've changed the way that this works. Right? Like, bear with me here. So
50:04 no, don't worry, it's just a read me, who cares. We could probably make this an entry point because we tried to make it work as cube pods but the plugin system is actually now force us down the noun verb sting. So we need the alias which means this doesn't necessarily have to be cube control pods. This can be Oh yeah, we can totally switch. We can switch on our V two. Yeah. We can work out the get. We can also work out the noun. Yeah. It's just one. We don't want a default there. Is it one? Is one not known Oh
50:47 no no, one sorry, what's gonna be known first. So this is just three and we're not gonna let them have a default there. We're not gonna support that. And then we can note another shift and what we're seeing is is the pods becomes known and I actually prefer this syntax. I don't know why I didn't do that. And then we pass everything else through. However, what we can do shift to. Thanks Alex. Let me pop that up. I think we're learning. I'm learning actually. So Idiomatically, you'd Idiomatically, you'd actually say yeah. I guess you can do that.
51:22 Idiomatically, what we'd actually do is you tend to extract one. So you'd say If that makes sense. Okay. I'll go with it. But we we need some special handling here. What we what you mentioned earlier was there are resources like there are things that aren't crud. So API resources, exec, should we build escape patches for that or do we just assume that people are always gonna use this as a special alias like KN rather than taking over a full K? Right. Maybe for now What about like exec and API resources and There's lot of them actually. Is CS one
52:18 or is it get CS? It's get CS, right? Yeah. Yeah. It's cluster status, it's cluster info, there's API extensions, API resources, API kinds. Let's just throw them one warning as an example and then people start I mean, if people are wild enough to start using this, they'll add in the other edge cases. Right? So what we're saying is if we run KN and we're in the known verb syntax and we do exec, we wanna warn on noun. Is that the wrong way around? Yeah. It's actually known first so and then Alright. Yeah. This was literally the
53:00 whole point in this, wasn't it? Maybe, yeah, let's just okay. Let's yeah. You're right. Let's make it easy. Let's check if now it is not pods or deployments. So case now. I can never remember the best case statement. Oh, it's the string and then a right paren. Copy. Yeah. Copy paste it. It's like that. Okay. So what we're saying is if known is in any of these and we'll just okay. So Yeah. And that seems to be like a yeah. This is reg x, so Yep. We're gonna say exec API resources. And we don't just wanna allow list pods
53:56 and deployments and warn on everything else, and then just allow list more things as we as we know they work, as we support them. Up to you. Up to you. Okay. So let's support pod pods pull. Yeah. What we're gonna do here is override noun to be pods. We'll always give it the full version. Nice. Anything else? I know. We still want the wildcard. Hey. Yeah. Hey, don't do this. Exit one. Ew. This is bad. Right. Exit zero. Then we're happy with the light. I I don't think it's an error. We're just in, hey, you you don't wanna do
54:50 Debugging Argument Handling in Crew Context (alpha 5, 6, 7 attempts)
54:52 this. Well, yeah. Fair. Well, I'm nice to chaining it with all the yeah. We didn't do anything wrong. Yeah. No. I think we I think we should to break pipelines stuff. Yeah. Yeah. Exactly. So let's test if this still works. We need to modify this. So whenever we're seeing that now we have this encapsulated group where it's non verb. We just drop it in and let's do my fancy copy again. This is CD. CP. C p. And then verb. Alright. So that means key in. Let's remove crew then. You're gonna redeploy it. I have no idea what I'm doing.
55:49 Hold on. Yeah. What are trying to do? I wanna see Oh, l n. What am I doing? L s. So that noun verbs is going to keep pods. So, yeah, we don't want that to do that anymore. What we actually Oh, right. No. Is Yeah. Let's just remove it. So Let's see. Crew bin. Let's just delete and see if the crew install Do wanna remove it and then install it? Yeah. So let's just remove it from the store. Yeah. I know what I'm doing. Oh, you know what? Screw you, crew. Oh, because it's Maybe overkill.
56:34 Oh, yeah. And I've got alias. What? Source Notebeard cannot be extracted into archive. Can be found in extracted archive. Because I blew out the inventory. Is there like a crew in it? Oh, no. We need to it's not in the archive. We literally need to do a git re do a git move, push it to get up, do another release. Alright. It's got the old name in it. It's got the old name in the zip file. Right? We need to do c I before we do c d. Let's add let's make sure we confirm that delete.
57:13 We don't want the tarzip commit. Chore refactor. Git tag alpha three. Oh, let's update that fail. Add commit and no oh, I've got an alias for that. Okay. Retag it. Stop judging me. You didn't push it, it's fine. Alright. Let's get a release on the go. This is this is my finest work. I was gonna say this is dreadful but I don't think I've ever written anything nicer than this, so. I don't think I've ever been as productive in another one. This is this is this is a nice development ecosystem to be fair. I was expecting this to
58:10 be nasty, like extending the schedule is nasty or very complicated, like writing a a CRI plugin is very complicated. This is really nice. Yeah. Not been too bad, actually. Okay. So I've got a really broken crew directory right now, actually. So I think I think you might wanna burn it to the ground. Yeah. So You have to reinstall crew now, of course. Install. Reinstall crew. I need an alias for that. I'm never typing that again. Oh, it doesn't like reinstall. I thought that was a thing. I think it might just be reinstall. BrewLink crew should do it because that's that's
59:04 actually all you broke, isn't it? I I don't know. Let's just let it do that. Alright. Let's see. Install. Of course, that doesn't work. This one. It's alright. Okay. Brew. Uninstall crew. I really shouldn't have blown away that whole directory. I knew that was getting carried away. I don't think it's that. I think it's complaining about our archive. Oh, right. It's complaining about the thing on GitHub and saying it doesn't have QCTL noun verb in it. Is it because it's noun verbs? Oh, you're probably right. Sorry. Pair program. Oh, noun verb, verb. Is noun verb at s h.
59:50 Should we call that archive and see what's what's going on? Well, I mean, this is wrong. Right. We we need the shag again. Oh, right. Oh, right. Yeah. Yeah. I'm gonna have to install some sort of new quartiles or something like that I think for that. That shit is not the same, is it? It shouldn't be. It shouldn't be. Oh, I downloaded the wrong fail. I it's totally amateur error. I'm really sorry. Sorry. The pressure of typing is is real. Is that too You never feel so smart as when you're a pair programming Here we
1:00:42 go. Pair. Because you're just the guy sitting there, like, using 10% of your brain power, just picking fault. Don't worry. If this was reversed, I would look like a complete idiot. You'd be like, Matt, that's wrong. That's wrong. So yes. There's a weird this doesn't that's checking an egg problem here. Right? So for me to update the code and tag this as v four, I would need to push that, release the tag and then push this with the shot. Oh, yeah. How do you keep this on how do you keep this under version control? Maybe this doesn't maybe it shouldn't live in
1:01:21 our repository. Maybe someone's done that just for the heck of it, and this lives in the crew repo, and I'm just like Yeah. Maybe. But then you'd have to have right access to the crew repo, or you'd need to PR every time you wanted to do a release. We so we have this at my we had this at my old place with exactly this problem that was because we use Bazel to do hermetic builds. You'd commit the last of the code and lay the tag to do a release, and then it would go through CI,
1:01:49 and you then you'd end up with a container image with the char of the container image. Right? And only then could you update your your Helm files to tell Kubernetes to deploy it. So you ended up with this weird double commit because we didn't have a separate info repo. I really wanted one, but the the people who ran the the, you know, back in microservices team were so set on their Bazel and their mono repo. We would even the manifest needed to be in there. So, yeah, we had exactly this double commit to get the shark kind of
1:02:18 issue. Yeah. So So I'm not we're we're not gonna solve that today obviously. What I'm gonna suggest is that I I mean we've already pushed v v one alpha three and I'm just gonna do the current install which should hopefully just use the archive. Yeah. I've updated the shallowly, I'm not committing that I'm not pushing it with an alpha four and getting in a loop. I'm just gonna do that. Right. We didn't check the. Okay. We're testing in process. So my very poor attempt at making this work work. So let's run this locally. I mean
1:02:58 It's subjecting to that reject syntax. To what is the bash reject syntax. Yeah. I guess it's not that. They're just doing They've got square brackets for character groups, which you'd expect. Maybe you literally have to do it like that, spell them out, and have them fall through. Because the double double semicolons, like, break. Right? Yeah. So we can now fall through. That'll get it working. That'll get it. Pods pod Pull. I'm not here to write vertices. Life's too short. And if I wanna test this, the easiest way to do that would be noun verb. Although, now it's not gonna work because oh,
1:03:50 yeah. Noun. Well, it doesn't matter what that Yeah. Okay. So length seven. Okay. So the fall through is not quite right. Oh, wait. Wasn't it running the old code then? Look at that error message again. No. It's complaining about Got it. No. This not really having a statement, I guess. Was there an example of a fall Does it need to be tapped in? Did literally our our statement literally be tapped in? Oh. As in, yeah, as in that? And I think this something this wrong here then. Right? So No. No. I think that's fine. I think that just needs to be indented
1:04:30 more than the and and the semicolons. I think they just need to be dented more. Yeah. Try it. Line seven. Which one's seven then? That's weird. I mean, if we let's I I don't mind if it's duplicated for now. Yeah. Right. Yeah. Let's make it work. Okay. Cool. So someone must have done this before. Bash case multiple matches. Yeah. Thanks, Google. Was just trying to pay. Oh, no. Wait. That's just the question. Yeah. Like I did it all the time. Oh, no. Okay. So just a piped. So let's try pod pull. So we were just being a bit too
1:05:21 reg x y for it, I think, maybe. We were being too good. Okay. I get that. I get that a lot. You get that a lot. Yeah. Yeah. Yeah. Cool. There we go. And since we're gonna push another release, let's make it a bit more useful. So deployments. Deployment. Deploys. Deploy. Yeah. I've never used anything shorter than deploy. Have you? Does anybody else think you can. Deploys. I'm using my command here. Hold on. Is there a way to get the aliases actually? I've never don't know if I've done that. Yeah. I think CTL API resources tells you
1:06:01 that. Oh, yeah. Cool. So Deploy. Yeah. And then you could just pluralize. I couldn't oh, that's okay. So deployments and deploy. So ours is better because we're giving you deployment and deployed. So I okay. And let's make sure that this is bad works. Exec, thingy, majiggy. Yeah. There we go. Nice. This is bad. We don't support known yet. Nice. PR's welcome. Great minds. Alright. So we need to add our YAML, our cube control and we wanna update the version to be version four and we're not gonna update this one until we've done the release. So
1:07:12 commit bash m. Fix use. Ah, bash. Yeah. Fixed us rather than return. We go tag it alpha four, don't need a force. Push with tags. I feel like we're almost there. Which means now we create the release. Yes. And that should be us. New release. This is v one alpha four. Definitely a pre release. We had a couple comments come in here, so DevOps directive said, good stuff, fun over your morning coffee. Cool. Good. This is a bit of a weird one but I'm definitely enjoying myself I hope that is true. Yeah yeah. And Adam says you're a little late. I mean
1:08:16 I feel sorry for the people who late because this is wild but you watched the Laravel Docker streams good work. Oh thanks man, appreciate that. Okay so v one alpha four is out which means now the crew installed didn't work last time right? So hopefully we can just, there must be some sort of update command but first I'm gonna re download. We'd fix that SHA right? Yeah. Let's get our new SHA, which is here. Weird checking egg thing. I don't think we're doing this right at all. I think GitHub actions would let us do this in one go.
1:08:52 So let's take a look at For example. Yeah. It must have an upgrade command. Yeah. That's an sure. Upgrade install plugins to newer versions. Update local copy of the plugin index. Let's try and update. See if it pulls that. Oh, wait. This is coming oh, yes. This is coming from crew index repository. So we do need to push the manifest to that. But we pointing at a local oh, right. So can we just give it a manifest? Can we do a local update by pointing it in a manifest still? Would it still take that dash dash manifest?
1:09:27 No. So am I gonna have to uninstall it and reinstall it? That must be the Maybe. The local workflow, I guess. So uninstall noun verb. Noun verbs. Like, it is in my install. Reinstall. Oh, yeah. And now we could do Ken. Let's see if we get our exact thing. Although it said we don't support DHHF. So it's wrong wrong interpretation. But we do have. Oh, no. Oh, no. Oh, we literally shifted too many times. Oh, this works locally. Right. It worked locally, but there's an extra argument in the front when you're running in production. Right. Hot fix. We need a test
1:10:14 on this. We need a hot fix. Alright. So we need to push five and we need to fix our bash so noun is two. We can fix this. Oh, so that's properly right now actually. And then this is oh no. That's it's still one. We just need to shift. So shift two. Oh, you did that when you were factoring. That's what it was. Yeah. I did. I broke it. Okay. You think how many mice Oh, and there's a bug. Yeah. So there is. Okay. So And then we do a shift and get okay. I'm confident with that. Are you confident?
1:11:03 It feels like a lot of shifts, but okay. Okay. So we are pushing our new we need to go to alpha five. This is a very fast moving project. Definitely cloud native. Multiple deployments a day. Testing in production. I mean Unrefactored mass fix. How? Correct. Push with tax. We're almost there. So, you got the muscle memory for this now. I know. I've got I've got the groove going. So You're in you're in flow. Alpha five. I mean, I'm almost tempted to v one this now, to be honest. If this worked, we could, like, we we could
1:11:48 naught point one it. Yeah. Yeah. Yeah. For sure. Alright. Let's grab release five, SHA Summit. Copy this. Uninstall. Reinstall. I mean that development loop is not ideal I think, I still think we're doing something slightly incorrect with how crew wants us to work but it's working for now. It is what we haven't actually read their docs to be fair so. That's true. So let's uninstall, and then verbs, and then install, and then verbs. That should work. Okay. Oh, yeah. Come on. Look at that. Hey. Let's scrape. Engine x. Oh, no. No. What? I don't understand.
1:12:39 That's That should work. How is it extracting that? Okay. So how did it get known NGINX one? So we look at the old patch. No, it was verb. It was verb, right? Oh no, it was noun. No, was noun. Yeah, verb should be here. Shifting to I think we, it's that shift. What happens if you shift twice and there's only one in the array? Is that and we're just rejecting the last one. Oh, maybe. So it's shift one to get the known. Shift to oh yeah. That you're right. There was too many shifts. Shift one. That's what
1:13:29 I'm saying. Let's run this locally. I'm not I can't reason about this from first principles because I don't actually know what he's doing. I think we just need a lot of print f debugging. Yeah. It worked locally. Yeah. How did we break it? But it gets one more argument, right, when we're running No. Because I'm passing in noun. Oh, you are? Yeah. Describe nginx one. Alright. That that is perfect. So let let's push it one more time and then we'll wrap it up. We're kinda getting towards the end of an hour and a half. And as much fun as it
1:14:09 is Oh, wow. We've got a job to do. Real jobs. Yeah. First, we need to put back the code to what I wrote because that was correct and you need to publish that in public. And then there we could we could call it. That's gonna hurt with that commit. Right? Okay. It was the sarcasm. That's why I'm coming for you, David. It was the shade I got last time. Re unrefactored, Matt. And I'll take it out of court. Oh, thank you. Affects him Don't feel so needed. David's. The humiliation. Right. That was worth it. Right. Alpha six six alphas in a day.
1:14:54 Right. So let's get a I wish we had to get some seed some seed funding for that. We don't have a star yet. I'm really disappointed in your audience. Come on. No. I think it'll get hub star. This is gold, pure gold. Right. Imagine the amount of update notifications you get Oh. Oh yeah. Just don't watch it. That's probably a poor idea. But star of the thing, please. So we now have alpha six and we wanna uninstall. Install key in pods. Oh, come on. There's something weird happening between us running this locally versus what we're getting as the
1:15:51 so the plugins getting one less. That's what it is. So Oh, is it actually stripping it? Right. Yeah. Because remember, it's just it's just executing our script. Of course. It is. But I I assumed it would dump its own argument array through. I didn't think it would okay. So we just need to lose that first the first shift. Yeah. Right. I thought it was I thought it was copying its argument array verbatim. I'm sure we had evidence for that. Oh, I don't know. I don't know. We're now in alpha seven. I don't know what the commit message is
1:16:29 for this fix. Let's just do shrug emoji. Yeah. We'll go with this one. Okay. Try again. That item was pretty decent. I'm assuming it doesn't handle the skin tone variance. That seems to be the problem. Right. There's tag seven. I see now there's a window for someone to have starved this and if it's not you Matt, I mean, what are you even doing here? So. I mean, it's me because I thought we needed some love. Yeah. If it wasn't you, you were gonna get called out for that, so I'm glad. Right. Okay. Now we have seven for redownload and release.
1:17:23 I really I I don't like this workflow. No. We could I mean, I don't think it's the workflow that's expected of us. I think it's us doing something. I don't think we need we don't need to install it every time. Right? We could literally just overwrite that SIM link. Yeah. Alright. That's what's I'm sure it says. So can pods. Get. Should be the same. There's bit of lag. Yeah. I'm at Nail biting for Eric. Oh, yeah. Look at that. That's so exciting. Job done. Oh, the final test. Exec. Oh, yeah. Nice. And it doesn't support exec.
1:17:40 Successful Local Installation and Testing via Crew
1:18:12 Awesome. Good work, team. Yeah. Let's add. So that we add to the noun verb. It's not a tag. It's not a release. So this is just a chore. Update it. Crew manifest. I don't think the manifest should probably live in this repository. But for now, we have a working plugin. I'm happy to No. I mean, what what we haven't done is publish it. Right? I guess publishing it is gonna involve getting that manifest into the central upstream Yeah. There's a crew index which Right. Which I assume means Yeah. We need to PR or something into this.
1:18:30 Discussing Crew Index Publishing & Future Work
1:18:50 Yeah. There we go. So this is just Maybe this is the canonical source. Maybe it's not. I don't know. We we could avoid the double commit thing with with some GitHub action magic. Well, don't think we need the double commit. We just don't need that Oh, we we just made the file. Yeah. Yeah. The other repository just becomes the actual the single source of it. So let's try we we we want to submit that PR, like I'll do that later. I don't think it's quite ready. Do mean it's not ready? Does it handles pods and deployments.
1:19:29 We need that we should put a license on it at least. You're right. Okay. Yeah. Let's get that cleaned up and ready for open source consumption. We can fight on the license later. I'm assuming we'll just go MIT though. So Oh, yeah. Yeah. I just mean it's it's polite to put to to give it to the world. Or we could proprietor license it and sell it. I pay nothing for that. Yeah. Yeah. That was fun. I really enjoyed that. It was. I hope people watching that got some value from understanding how a cube control plugin works.
1:19:50 Conclusion
1:20:02 The development cycle working with crew, I mean, don't think we've nailed that. I think we identified at the end there the reason we have that weird thing. I'm not sure how to upgrade a local plugin but there's definitely stuff that is to get that a little bit nicer. And hopefully, some people find this useful when we publish it. Anything you'd like to add or finish with there, Matt? No. I don't think so. That was that was a lot of fun. I might go and write a couple of plugins. Thank you very much for having me. No. My pleasure.
1:20:31 Thank you for joining me. Thank you. I I really I'm looking forward to adding a few more nodes to this and actually using it in my daily cube control journey. So anyway, that's I'm gonna refactor all my shell this is. Yeah exactly I can cut off so many KPOs, KPDs, all these different things. Yeah. Alright anyway, thanks have a great day I'm gonna actually do some real work now before I get fired So I'll speak to you soon. Cool. See you soon. Bye.
Technologies featured
Meet the Cast
Stay ahead in cloud native
Tutorials, deep dives, and curated events. No fluff.
Comments