Jump to content

ChristianOlsen

Member
  • Posts

    17
  • Joined

  • Last visited

Everything posted by ChristianOlsen

  1. alfred-kubectl This workflow can be used to query a Kubernetes cluster and retrieve resources. Currently the following global resource types are supported: Node Namespace PV And namespaced resource types: Pod Deployment Configmap Secret Statefulset PVC Link to workflow Link to the Github repo. Usage The main workflow keyword is kube. The workflow will guide the user through a series of api calls that will end up with a list of resources of the chosen type. From here the user can use action modifiers to get further info about a resource (describe) using CMD+Enter. For resource type pod two additional action modifiers are available: OPTION+Enter: get pod logs CTL+Enter: open an interactive session in the pod using /bin/sh Another keyword (kube-context) can be used to quickly change context. This can also be set in the workflow configuration. Screenshots Initial prompt - pick a resource type Pick a namespace or choose all namespaces Get resources Dependencies This workflow relies on Python 3 and the following python packages (all shipped with the workflow): os sys json kubernetes The workflow furthermore relies on the Kubectl CLI package for fetching details about the resources, pod logs and for executing code in pods (kubectl exec). Both resource details and pod logs will be moved away from kubectl in a later release, but opening interactive sessions into pods can't be done through the python client. Kubectl can be installed with Homebrew and from binaries.
  2. Thank you:) I understand that this isn't the norm. I'm working on a workflow that talks to Kubernetes clusters and it's very useful to be able to quickly switch between clusters (context in k8s lang). I could possibly set this up without a configuration variable, but I feel this is the cleanest way of doing it, as it makes sure the "default" context is set when the workflow is initially installed. Leaving this here for the others that might also need this: on run argv set theQuery to item 1 of argv set bundleID to (system attribute "alfred_workflow_bundleid") tell application id "com.runningwithcrayons.Alfred" set configuration "kube_context" to value theQuery in workflow bundleID with exportable end tell return theQuery end run Here "kube_context" is the configuration variable.
  3. What's the best way of updating the variables set by the configuration builder? I want to update these variables through a keyword flow. The following method will work (I think), but I'm unsure if it's the "right" way: check if prefs.plist exists if yes, check if variable is set here and update the value if it is otherwise update the value in info.plist
  4. I see, I guess I can exchange it with a script filter. But what about the main icon of the individual blocks? If I drop an icon into the GUI it generates a file with the uid of the block. Is there a way to point it to an existing image file?
  5. Is there a way to add icons to blocks and individual items in List Filters other than dropping a file in the window (see screendumps)? I already have the icons I want to use in a separate folder (./resources/) that I use for Script Filters. I want to use these icons for block icons and for list items in a List Filter. If I drop an icon in the GUI a new file is generated, which just means I have more files than actually needed.
  6. Thank you. Nice catch, it's fixed. new release is v1.1.2
  7. I've updated the screenshot as requested. I've also updated the workflow to use the 'External Script'. New release v1.1.1
  8. Simple workflow for controlling already installed WireGuard VPN connections. Github repo: https://github.com/Chrede88/alfred-wireguard Link to forum post: I'm the author of this workflow.
  9. Does your WireGuard tunnel show up in Preferences-->Network? I must admit that I'm not really an expect in VPN connections! If you haven't been able to find anything on google, I probably won't either. Sorry!
  10. I'm running v.1.0.12, which is the newest version in the Mac app store. Everything works fine for me! What version of Wiregaurd are you running? Do you have Wiregaurd tunnels installed? The fact that {"items":[]} is empty means that no Wiregaurd tunnels were found!
  11. WireGuard Control Simple workflow that toggle on/off any existing WireGuard VPN tunnels. The workflow is written in bash, so it should be pretty robust against OS updates etc. New release Version 1.1.2 released! Improvements: 1) VPN connections are sorted so the results are always in the same order. 2) Filtering of the results, by user input, enabled. 3) WireGuard is now spelled correctly (Capital G). Download: https://alfred.app/workflows/christianolsen/wireguard-control/ Instructions: Use the keyword "wguard" to activate the workflow.
  12. Right, that's a good reason! Thanks you for clarifying that! Yeah, that's a good idea I'll do that 👍 Thanks again for a great workflow.
  13. Thank you for a great workflow I know my issue is not the workflows fault, but I'm posting it here in case someone has had a similar problem! I'm having some problems using sftp:// and Terminal. I can see that the workflow executes the correct command: "open -a Terminal sftp://host". But nothing happens! No new Terminal window is opened regardless of Terminal is running or not. I know my ssh config is setup correctly as "ssh://host" works fine and I can open a sftp connection by manually executing "sftp host" in Terminal. I have VLC installed which by default catches sftp:// URL's, so I fixed that using "SwiftDefaultApps" even though the workflow is using the -a flag. That didn't help. Anyone had this issue? Google isn't much help. Most people just say that one should use ftps, but that's a completely different protocol! Hence, not helpful. Setup: Alfred-ssh: v0.8.0 macOS: 10.15.4 Terminal: 2.10 Default shell: /bin/zsh
  14. Thanks for the nice walk through:) It seems that the country code for Denmark is DK, but for some reason it doesn't work with your workflow. https://www.dropbox.com/s/5egwd80ytxn5t7j/DK.png?dl=0 Any suggestions?
  15. Hi citelao Thanks for a great workflow:) Is there any way to add a notification when a new song starts?
  16. Hi atheos Great workflow:) As katie, i'm not in the US and therefore need to change the country, in my case to DK (Denmark). The normal ISO country code for Denmark is DK, but that doesn't work. Do you know where I can find the country codes used by Netflix?
×
×
  • Create New...