Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for Observe Only Resources #1744

Merged
merged 7 commits into from
Aug 7, 2023

Commits on Aug 4, 2023

  1. crossplane-{tools,runtime}@master, go generate

    	go get github.com/crossplane/crossplane-tools@master
    	go mod tidy
    	make generate # failed
    
    	go get github.com/crossplane/crossplane-runtime@master
    	go mod tidy
    	make generate # retry, OK
    
    https://github.com/upbound/upjet/blob/main/docs/adding-support-for-observe-only.md
    
    Signed-off-by: Carl Henrik Lunde <chlunde@ifi.uio.no>
    chlunde authored and haarchri committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    c2f1932 View commit details
    Browse the repository at this point in the history
  2. Add --enable-management-policies flag

    Signed-off-by: Carl Henrik Lunde <chlunde@ifi.uio.no>
    chlunde authored and haarchri committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    0f50d13 View commit details
    Browse the repository at this point in the history
  3. Pass management policy flag to the controllers

    Fixes crossplane-contrib#1726
    
    hacked using emacs:
    
    	for f in $(grep -lr 'func Setup' pkg/controller/  ); do emacs --load refactor.el "$f"; done
    
    refactor.el:
    
    	(defun last-macro ()
    	  (interactive)
    	  (atomic-change-group
    		(search-forward "func Setup")
    		(search-forward "managed.NewReconciler")
    		(search-backward "m")
    		(set-mark-command nil)
    		(search-forward "(")
    		(left-char 1)
    		(forward-sexp 1 (point))
    
    		(kill-region nil nil 'region)
    		(insert "r")
    
    		(search-backward "return")
    
    		(previous-line 1 1)
    		(end-of-line)
    		(newline nil 1)
    		(insert "r := ")
    		(yank nil)
    		(newline nil 1)
    		(search-backward "r := ")
    		(search-forward "resource.ManagedKind")
    		(forward-sexp 1 (point))
    		(move-end-of-line 1)
    
    		(newline nil 1)
    		(insert "reconcilerOpts...")
    		(set-mark-command nil)
    		(search-backward "managed.NewReconciler")
    		(search-forward "(")
    		(left-char 1)
    		(forward-sexp 1 (point))
    		(left-char 1)
    		(kill-region nil nil 'region)
    
    		(search-backward "r :=")
    		(previous-line 1 1)
    		(insert "
    
    	reconcilerOpts := []managed.ReconcilerOption{")
    		(yank nil)
    		(insert ",
    	}
    
    	")
    		(insert "if o.Features.Enabled(features.EnableAlphaManagementPolicies) {
    			reconcilerOpts = append(reconcilerOpts, managed.WithManagementPolicies())
    		}
    	")
    
    		(goto-line 1)
    		(search-forward "github.com/crossplane-contrib/provider-aws")
    		(end-of-line)
    		(insert "\n\"github.com/crossplane-contrib/provider-aws/pkg/features\"")
    
    		(save-buffer 1)
    		))
    
    	(add-hook 'go-mode-hook #'last-macro)
    
    Signed-off-by: Carl Henrik Lunde <chlunde@ifi.uio.no>
    chlunde authored and haarchri committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    2980f69 View commit details
    Browse the repository at this point in the history
  4. feat(bump): bump crossplane-runtime and crospslane-tools

    Signed-off-by: Christopher Haar <christopher.haar@upbound.io>
    haarchri committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    a8fe545 View commit details
    Browse the repository at this point in the history
  5. feat(bump): rebase and bump

    Signed-off-by: Christopher Haar <christopher.haar@upbound.io>
    haarchri committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    7419056 View commit details
    Browse the repository at this point in the history
  6. feat(bump): set up_version v0.18.0 to fits build module

    Signed-off-by: Christopher Haar <christopher.haar@upbound.io>
    haarchri committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    19353c3 View commit details
    Browse the repository at this point in the history
  7. feat(bump): set golangci_version to v1.53.3

    Signed-off-by: Christopher Haar <christopher.haar@upbound.io>
    haarchri committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    bd916f6 View commit details
    Browse the repository at this point in the history