@@ -43,6 +43,7 @@ func NewPilot(opts *PilotOptions) (*Pilot, error) {
4343 nodeTool : opts .nodeTool ,
4444 }
4545
46+ // XXX Remove all this
4647 // hack to test the seedprovider, this should use whatever pattern is decided upon here:
4748 // https://github.com/jetstack/navigator/issues/251
4849 cfgPath := "/etc/cassandra/cassandra.yaml"
@@ -71,10 +72,13 @@ func (p *Pilot) WaitForCacheSync(stopCh <-chan struct{}) error {
7172}
7273
7374func (p * Pilot ) Hooks () * hook.Hooks {
75+ // XXX: Add a hook here to merge our blob of essential configuration with
76+ // the default configuration file found in the Docker image.
7477 return & hook.Hooks {}
7578}
7679
7780func (p * Pilot ) CmdFunc (pilot * v1alpha1.Pilot ) (* exec.Cmd , error ) {
81+ // XXX: Change this to Command("cassandra", "-f")
7882 cmd := exec .Command ("/docker-entrypoint.sh" )
7983 cmd .Stdout = os .Stdout
8084 cmd .Stderr = os .Stderr
@@ -129,3 +133,14 @@ func (p *Pilot) LivenessCheck() error {
129133 _ , err := p .nodeTool .Status ()
130134 return err
131135}
136+
137+ // XXX: Add a WriteConfig method which takes
138+ func (p * Pilot ) WriteConfig () error {
139+ // Look for cassandra.yaml in directory given by $CASSANDRA_CONFIG environment variable.
140+ // Unmarshall it as an unstructured map of strings.
141+ // Remove keys
142+ // Set SeedProvider key
143+ // Write back out (backing up the original)
144+ // NB: Comments will be lost.
145+ // Write the properties file. (backing up the original (if present))
146+ }
0 commit comments